Reputation: 1101
I'm familiar with G*Power as a tool for power analyses, but have yet to find a resource on the internet describing how to compute a power analysis for for logistic regression in R. The pwr package doesn't list logistic regression as an option.
Upvotes: 6
Views: 7387
Reputation: 33
To compute power for logistic regression with a single predictor in R (without resorting to simulations) you can use "wp.logistic" in package "WebPower". For dichotomous predictor the power for test for binomial proportions provided by bpower in package "Hmisc" may be more accurate.
Upvotes: 0
Reputation: 49640
This question and answers on Crossvalidated discuss power for logistic regression and include R code as well as additional discussion and links for more information.
Upvotes: 4
Reputation: 8267
You will very likely need to "roll your own".
And then think some more about whether all your assumptions really make sense. Vary them a bit. Is the resulting value of n sensitive to your assumptions?
Yes, this will be quite a bit of work. But it will be worth it. On the one hand, it will keep you from running an over- or underpowered study. On the other hand, as I wrote, this will force you to think deeply about your assumptions, and this is the path to enlightenment. (Which is a painful path to travel. Sorry.)
If you don't get any better answers specifically helping you to do this in R, you may want to look to CrossValidated for more help. Good luck!
Upvotes: 6