Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning: requirements for confidence levels not met #31

Open
tomwallis opened this issue Nov 7, 2014 · 2 comments
Open

Warning: requirements for confidence levels not met #31

tomwallis opened this issue Nov 7, 2014 · 2 comments

Comments

@tomwallis
Copy link
Contributor

I'm just going through some of the circstat stuff.

When I run the following lines:

test_dat = np.array([1.80044838, 2.02938314, 1.03534016, 4.84225057,
                     1.54256458, 5.19290675, 2.18474784,
                     4.77054777, 1.51736933, 0.72727580])

m, (low, hi) = circ.mean(test_dat, ci=0.95)

I get the following warning:

PyCircStat/pycircstat/descriptive.py:271: UserWarning: Requirements for
confidence levels not met.
  warnings.warn('Requirements for confidence levels not met.')

and if I print the confidence limits:

print(m, low, hi)

I get

1.35173983072 nan nan

If I run nosetests -v, I see that test_mean_ci_limits passes ok, and
test_mean_ci_2d gives the same warning (but passes).

What's going on? I presume it's something like that there are not enough data points to generate a distribution of means appropriate for computing 95% confidence intervals (i.e. there will only be a small-ish number of unique means, so the confidence limits are too coarse).

If that's the case, I think this warning could be made more specific (so that the user knows what "requirements" were not met).

@philippberens
Copy link
Contributor

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

You can see that the CI limits require a certain concentration of the
data around the mean (lines 263 and 267). These seem not to be met my
the test data, so the test data is likely not chosen ideally...

Am 07.11.2014 um 14:36 schrieb Tom Wallis:

I'm just going through some of the circstat stuff.

When I run the following lines:

|test_dat = np.array([1.80044838, 2.02938314, 1.03534016,
4.84225057, 1.54256458, 5.19290675, 2.18474784, 4.77054777,
1.51736933, 0.72727580])

m, (low, hi) = circ.mean(test_dat, ci=0.95) |

I get the following warning:

|PyCircStat/pycircstat/descriptive.py:271: UserWarning:
Requirements for confidence levels not met.
warnings.warn('Requirements for confidence levels not met.') |

and if I print the confidence limits:

|print(m, low, hi) |

I get

|1.35173983072 nan nan |

If I run nosetests -v, I see that test_mean_ci_limits passes ok,
and test_mean_ci_2d gives the same warning (but passes).

What's going on? I presume it's something like that there are not
enough data points to generate a distribution of means appropriate
for computing 95% confidence intervals (i.e. there will only be a
small-ish number of unique means, so the confidence limits are too
coarse).

If that's the case, I think this warning could be made more
specific (so that the user knows what "requirements" were not
met).

— Reply to this email directly or view it on GitHub
#31.


Dr. Philipp Berens

Bernstein Center for Computational Neuroscience
University of Tübingen
http://www.bethgelab.org
http://philippberens.wordpress.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (MingW32)

iQEcBAEBAgAGBQJUXM0wAAoJEFmQiZzLSxYeGmsH/AtABeRMFWy0wu1MeAsHhAPp
jJ7sd74BGg3bE6ia7G400b0Zrk8VAR9hOzhp0DgqPAfdhLqgyS8NTtk700BHSedg
EyBoUBbqz0xWubS5dvSF7ibsiEWa3gZ9sjlD/IPW6Jk0EcIuNoioWB7BI7XFPnj+
p7boKcg/XFf7P+R6UK61KIQsnGRu/gjWvM/TmYjFX8SVhiZTkd1v1xD0K9iXsb/A
nsUpCocEtCyJAePEU+/BncA07wKsfbBWnophnulAuX+OAp7GxIvzHbdy3QpV/+nR
6Eyih0UF2hk4eggs+nnh+n/gZ80/o5gGT/wvP82M4yi0Ds1uGCr6I4F3GWsqvMY=
=Z40F
-----END PGP SIGNATURE-----

@tomwallis
Copy link
Contributor Author

Yep. I think it would be good to write one or two more sentences in the warning text explaining to users what those requirements are and why they might not be met.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants