Added sample size estimator for a case of binomial proportion#730
Added sample size estimator for a case of binomial proportion#730pkaf wants to merge 4 commits intorasbt:masterfrom
Conversation
|
Thanks a lot! Btw. is there a way you can add some unit tests to make sure the results are as intended? Maybe comparing it with an equivalent implementation in R or sth along these lines? |
|
Numbers in the LHS of assert statements within test_one_sided_binomial_proportion_estimates() and test_two_sided_binomial_proportion_estimates() are taken from there. Are you suggesting something more/different? Happy to add. |
|
Oh I am sorry, I may have overlooked the unit test file before. Sorry, it's been a hectic week due to teaching. Will go over it more carefully soon :) |
|
All good. Anything please let me know. |
|
Coming back to this, the context of this function is to compute the sample size for normal approximation intervals / hypothesis tests based on normal approximations? Just asking because we probably should draft a documentation for this. Maybe we could embed this in the context of normal approximation-based confidence intervals and t-tests like I described here on pg. 10: https://arxiv.org/pdf/1811.12808.pdf |
Description
Related issues or pull requests
Pull Request Checklist
./docs/sources/CHANGELOG.mdfile (if applicable)./mlxtend/*/testsdirectories (if applicable)mlxtend/docs/sources/(if applicable)PYTHONPATH='.' pytest ./mlxtend -svand make sure that all unit tests pass (for small modifications, it might be sufficient to only run the specific test file, e.g.,PYTHONPATH='.' pytest ./mlxtend/classifier/tests/test_stacking_cv_classifier.py -sv)flake8 ./mlxtend