Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Sample size calculation and count data/Poisson regression

Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

🔒 This topic is **solved** and **locked**.
Need further help from the community? Please
sign in and ask a **new** question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 04-19-2013 04:36 AM
(25964 views)

Hi everybody,

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.

Best,

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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:

http://support.sas.com/resources/papers/proceedings11/349-2011.pdf

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)';

data power_poisson;

input trt $ mean;

reps=15; *<--change to any number you want to test;

do obs=1 to reps;

output;

end;

datalines;

control 7

exper 5.6

;

run;

proc print data=power_poisson;run;

proc glimmix data=power_poisson; *<--mostly ignore the output here, ODS tables are stored for manipulation below;

class trt;

model mean = trt / chisq link=log dist=poisson;

contrast 'control vs experimental' trt 1 -1 / chisq ;

ods output tests3=F_overall contrasts=F_contrasts;

run;

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;

nc_parm=numdf*Fvalue;

alpha=0.05;

F_Crit=Cinv(1-alpha,numdf,0);

Power=1-probchi(F_crit,numdf,nc_parm);

proc print data=power; *<--this printout is the relevant part, look at far right for realized power;

run;

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.

6 REPLIES 6

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Have you seen this thread? https://communities.sas.com/message/134629#134629

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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!

Best

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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:

http://support.sas.com/resources/papers/proceedings11/349-2011.pdf

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)';

data power_poisson;

input trt $ mean;

reps=15; *<--change to any number you want to test;

do obs=1 to reps;

output;

end;

datalines;

control 7

exper 5.6

;

run;

proc print data=power_poisson;run;

proc glimmix data=power_poisson; *<--mostly ignore the output here, ODS tables are stored for manipulation below;

class trt;

model mean = trt / chisq link=log dist=poisson;

contrast 'control vs experimental' trt 1 -1 / chisq ;

ods output tests3=F_overall contrasts=F_contrasts;

run;

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;

nc_parm=numdf*Fvalue;

alpha=0.05;

F_Crit=Cinv(1-alpha,numdf,0);

Power=1-probchi(F_crit,numdf,nc_parm);

proc print data=power; *<--this printout is the relevant part, look at far right for realized power;

run;

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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Thank you very much! I'm using this now.

**Available on demand!**

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.