2
$\begingroup$

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?

$\endgroup$

1 Answer 1

1
$\begingroup$

In that case, what is my $\sigma_x$

The predictor here is categorical. Most analyses will dummy encode these, which turns them into binary predictors (one for each exposure, save 1 category which is lumped into the intercept). The standard deviation $\sigma_x$ will simply be $\sqrt{f(1-f)}$ where $0<f<1$ is the frequency of that exposure.

As an example, if you had 50% in control and 25% in the other arms, then $\sigma_x = \sqrt{0.25 \times 0.75}$ (since the frequency of the exposure arm is 25%).

$\endgroup$
2
  • $\begingroup$ Can you please expand on $f$ and $\sigma_x$? I have multiple "exposures", so I recon I'll have multiple $\sigma_x$'s. They'd lead to different $\gamma$'s. Do I then pick the lowest one? $\endgroup$
    – Igor F.
    Mar 19, 2022 at 18:51
  • $\begingroup$ @IgorF. That is correct, the different frequencies of exposures will lead to different statistical power for each exposure. $f$ is the frequency of the exposure in the sample (the proportion of the sample which is given treatment A, for example). This leads to different $\sigma_x$ for each exposure, hence different power. $\endgroup$ Mar 19, 2022 at 21:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.