I am attempting to determine the sample size needed in a clinical study of 2 treatment groups to one control group (3 groups total). However, I am not sure how to calculate this properly. Traditionally, the bsamsize function in the Hmisc package is what I have been using to calculate sample size if the desired power, proportions of each group being compared (p0 under null and p1 under alternative), and the fraction of observations in the first group. You can find this function's documentation here: https://www.rdocumentation.org/packages/Hmisc/versions/4.1-0/topics/bpower

So I am wondering, how would one go about calculating the sample size needed for, say, 2 treatment groups and 1 control group, if one wanted equal numbers of subjects in each group? In this case, I don't think there is a way to do this using the bsamsize function, since this assumes only one hypothesis being tested. How would I want to go about specifying multiple hypotheses (e.g., Control mean is different from Treatment 1 but not Treatment 2, Control mean is different from both Treatment 1 and Treatment 2, etc.)?

So far, I have tried the following code using generic values:

p1 = 0.1
p2 = 0.15
frac = 1/3
bsamsize(p1, p2, fraction=frac, alpha=.05, power=.8)

To get the output:

n1        n2 
525.3318 1050.6636 

I believe that the fraction needs to be 1/3 if I have 3 groups total. But, when using this function, we can only specify p1 and p2, and not a third proportion, say p3, to get 3 equal sample sizes for 3 total groups.

I am hoping that someone knows of a package that can handle a research question such as this. I also would be interested to know how to generalize this problem, say to compare 3, 4, 5, ..., x treatments to a control at once.

Thank you for any/all help!

  • 3
    $\begingroup$ @MichaelChirico, That is probably a good idea. I am pretty new to Stack so I'm not quite sure how to move it - do you know how to? $\endgroup$
    – Nate
    Jan 2 '18 at 13:57
  • $\begingroup$ Darn, so the waiting game begins... $\endgroup$
    – Nate
    Jan 2 '18 at 17:27
  • 1
    $\begingroup$ How is the analysis going to be conducted? Trt1 vs Ctl, then Trt2 vs Ctl? Usually, you just take 50% more than the appropriate two sample test. $\endgroup$
    – AdamO
    Jan 2 '18 at 18:17
  • $\begingroup$ I suppose that is also up for question - is there a 'most efficient' way to run a study such as this? If the treatments are assumed to have similar effect, then would what you suggested, @AdamO , be the same as my calculation above? Since one would get 525+525=1050, + 50% of 1050 is 1575? $\endgroup$
    – Nate
    Jan 2 '18 at 18:46

If you do a three group comparison: Trt1 vs Ctl and Trt2 vs control, then a sample size calculation can be done in the following way:

Obtain sample sizes for Trt1 and Ctl in a two group comparison.

Obtain sample sizes for Trt2 and Ctl in a second two group comparison.

Assign Trt1 and Trt2 according to their respective sample size calculations. Assign control according to the maximum of either sample size calculation. It will simply be a slightly more precise/powerful comparison in the smaller, larger effect treatment group. If the effects of Trt1 and Trt2 are equal, their sample sizes are equal, and you simply assign another 50% of the participants to the other treatment.

  • $\begingroup$ Hi @AdamO, thank you for your response, that makes sense. $\endgroup$
    – Nate
    Jan 3 '18 at 12:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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