# Power Analysis for Logistic Regression with one nominal variable [duplicate]

How do I estimate sample size or do power analysis for logistic regression with one nominal independent variable? Is there a way to do it with Stata?

• How are you handling the nominal variable? Converting to dummy variables? That's the default in Stata and R, but the answer depends on it. Also, I'm assuming you mean "power analysis for the test of whether the regression coefficients are zero." Or something else? – shadowtalker Apr 30 '15 at 3:18
• You should give some more details. How many levels of the nominal variable? Are the distribution of the levels uniform? If you have only two levels, with about uniform distribution, logistic regression should be close to the chisquare test of the $2\times 2$-table, so you could use power analysis for that case. – kjetil b halvorsen Apr 30 '15 at 7:55
• 6 levels not 2. – sfarran Apr 30 '15 at 14:35
• – kjetil b halvorsen Mar 12 '19 at 11:24