turn on suggestions

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

Showing results for

Find a Community

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

Topic Options

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-19-2013 04:36 AM

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,

Accepted Solutions

Solution

07-05-2017
07:35 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to AnalytX

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:

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.

All Replies

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to AnalytX

04-19-2013 03:51 PM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to AnalytX

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?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

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!

Best

Solution

07-05-2017
07:35 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to AnalytX

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:

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
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

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.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

03-03-2016 04:45 PM

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