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 calculations with SAS

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
- Highlight
- Email to a Friend
- Report Inappropriate Content

01-17-2013 03:53 AM

Hello everyone,

I would like to ask for your advise regarding sample size calculations using SAS (either with the power and sample size module or directly with code).

It is very simple calculating a sample size using the well known "t-test" scenario, and both SAS and other packages support this calculation, which is straightforward even manually.

What I want to do, is to calculate the required sample size for a trial with random effects. For example, random effects can be a multi-center effect, a repeated measures effect, or any other random effect. A trial can even have more than one random effect. My intuition say, that the more variance components I add to my model, the more samples I will need. I tried looking online for a solution but so far failed. Can I use SAS to calculate sample size for trials which will be analyzed with a mixed model (either with mixed proc or glimmix proc) ?

(Let's assume for now that my response is continuous just to make it more simple)

Thank you very much !

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

01-17-2013 07:04 AM

It is not simple, but the only practical way that I can think of to do this is through simulation. The hard part is correctly simulating data. The random factors and covariance structure are going to be critical. Once you generate a good dataset, then it is a matter of doing the analysis, and recording the type II error rate for a preselected number of simulations. Then change the sample size, and repeat. Repeat this process until you can get enough results to narrow in on the sample size needed to control type II error at a given type I error rate.

I would suggest a google search on simulating clinical data for calculation of sample size. There are probably some macros out there that will help. If you do not have IML licensed, I strongly recommend that you get it, as developing correctly specified datasets through data steps is exceedingly difficult.

Steve Denham

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

01-17-2013 08:32 AM

I agree with Steve: simulation is the way to go. In my forthcoming book, Simulating Data with SAS, I have examples of power and sample size analysis and simulation of mixed models and repeated measures. Unfortunately, the book is currently undergoing a copyedit and won't be published until Q2 of 2013.

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

01-17-2013 10:57 AM

Here is another example where the wonderful new book by Walter Stroup is essential -- Generalized Linear Mixed Models: Modern Concepts, Methods and Applications (CRC Press, 2012). Chapter 16 is all about power and sample sizes for mixed models (multiple random effects, etc.). There are too many things to cover here, but Stroup gives detailed instructions on how to do what you want. Although simulation is useful, of course, you can do several things without simulation by using GLIMMIX or MIXED (coupled with the PARMS statement and HOLD option). By the way, Stroup is one of the authors of the classic: SAS for Mixed Models, 2nd edition (SAS Publ.).

For immediate access, check out the 2011 SAS Global Forum article by Stroup:

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

He goes through a LITTLE of the sample size and power calculations for mixed models. As he correctly points out, not properly taking account of the random effects can lead to meaningless results.

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

01-18-2013 08:00 AM

Holy cat. I had forgotten all about Walt's method (and had even used it a couple of times).. The Litmus Test design in the paper really helps me with a problem analysis we have had--and makes me think hard about using R side covariance structures when G-side may be a better approach.

Steve Denham

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

01-19-2013 04:57 AM

Thank you all for replying quickly.

Simulation sounds like an interesting way...

Rick, I am looking forward for having your book, already singed up on the SAS website and will get a notice when it's up for sale.

I have heard about the book of Walter Stroup, and for some weeks now I am thinking of buying it. If the book actually present an easier way of evaluation sample size, then it's another reason to get this book on my shelf.

Thanks everyone, your comments are very helpful and very appreciated !