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?

  • $\begingroup$ 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? $\endgroup$ Apr 30, 2015 at 3:18
  • $\begingroup$ 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. $\endgroup$ Apr 30, 2015 at 7:55
  • $\begingroup$ 6 levels not 2. $\endgroup$
    – sfarran
    Apr 30, 2015 at 14:35