04-19-2013 04:36 AM
I would like to perform a sample size calculation with count data (cumulative number of a particular event) as primary endpoint. Do you have any idea how to proceed in SAS?
Thanking you in advance for your answer.
04-19-2013 04:55 PM
It would help to know more details. Are you trying to estimate one or more means with a fixed level of precision or are are trying to achieve a certain power for a contrast (such as the difference of two means)? Or something else? Do you have any random effects?
04-24-2013 03:30 AM
Thanks Rick and LVM for your answers!
To be more precise:
We would like to determine the sample size for a study according to the primary study outcome which is a count variable. According to litterature, we know that the average number is 7 events in the population. We estimate a decrease of 20% in the treated group at the end of the study. With an expected rate of 7 events using a two-sided Poisson regression at the 5% alpha-level, what is the number of subjects needed to detect a 20% decrease with at least 80% power?
Thanking you in advance for your help!
04-24-2013 10:34 AM
As far as I know, PROC POWER does not have a direct way of dealing with Poisson (others can correct me if I am wrong). However, one can use the approach advocated by Walt Stroup in the 2011 SAS Global Forum:
He was emphasizing GLMMs, but you don't have any random terms. The approach determines the power for different means and sample sizes. You have to try different sample sizes (variable: reps) until you obtain the desired power. I modified for Poisson. For reps=15 and your means (7 and 5.6 [a 20% drop]), power is only 0.33. Try reps=50 and you will see that power is about 0.8.
title 'Power analysis for Poisson, 2 treatments';
title2 '(based on Stroup, 2011, 2012)';
input trt $ mean;
reps=15; *<--change to any number you want to test;
do obs=1 to reps;
proc print data=power_poisson;run;
proc glimmix data=power_poisson; *<--mostly ignore the output here, ODS tables are stored for manipulation below;
model mean = trt / chisq link=log dist=poisson;
contrast 'control vs experimental' trt 1 -1 / chisq ;
ods output tests3=F_overall contrasts=F_contrasts;
data power; *<--this data step takes relevant parts of above output to get power at given N and treatment means;
set F_overall F_contrasts;
proc print data=power; *<--this printout is the relevant part, look at far right for realized power;
This approach is described in SAS for Mixed Models, 2nd Edition (2006) and in Stroup book (2012, chapter 16). I changes for Poisson. You can expand for any number of treatments, treatment means, and use different distributions. With random effects, you would need to to hold those variances constant. See the listed paper and these references for more details. If you use this approach, you should definitely cite Stroup.
04-24-2013 11:08 AM
As usual, lvm provides excellent code and citations. I'll only add a shameful self-serving advertisement:
In my book, Simulating Data with SAS, I provide several examples of using simulation to compute power and sample size (Ch 5 [p. 84-88], Ch 6 [p. 94-95], Ch 11 [p. 211-215]). My book is more elementary than Stroup's book and does not focus solely on regression models. However, if you ever need to simulate multiple correlated covariates for a more sophisticated model, my book might be helpful.