My question is kind of a sequel to this one. For an experiment I'm designing, I want to model the outcomes by a binomial regression, something like
bmodel <- glm(cbind(succ, (N - succ)) ~ x + x_ind, data = tb1, family = "binomial")
where x_ind
is an indicator variable, indicating the experiment arm (placebo, therapy A, therapy B). I want to establish whether therapies have different effects, to which end I'd observe whether the indicator (dummy variables) significantly (say, at the $\alpha = 0.05$ level) differ(s) from zero.
I need to calculate the number of subjects required for achieving the desired power. The answer to the above linked question explains how to compute the power for binomial regression when the predictor is continuous:
$$ \gamma = 1 - {\bf{\Phi}}(1.96-\vert\beta\vert\sigma_x \sqrt{(np(1-p)} )$$
with $\gamma$ being the power, $\bf{\Phi}$ the normal CDF, $\beta$ the effect size, $\sigma_x$ the standard deviation of the predictor and $p(1-p$) the marginal variance of the outcome.
In my case I don't care about the continuous predictor, just the indicator. In that case, what is my $\sigma_x$? Simply the standard deviation of a discrete uniform distribution in the range $1 \ldots $ number_of_therapy_arms? But the therapy arms are actually on the nominal scale, so this approach doesn't seem quite right to me. Also, how would the approach change if I did care about the continuous predictor?