Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down on April 23, and its replacement, **statalist.org** is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
Neil Shephard <nshephard@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: power calculation graphs |

Date |
Fri, 20 Aug 2010 10:04:11 +0000 |

On Fri, Aug 20, 2010 at 8:54 AM, Nikolaos Pandis <npandis@yahoo.com> wrote: > Hi to all. > > I was wondering if someone would be able to help me draw the following sample calculation graphs with Stata: > > 1. Two arm parallel trial, outcome binary. > > A power (y-axis) sample size (x-axis) calculation graph for various failure proportions between trial arms. For example, p1=0.80 and p2=0.85, or p1=0.80 p=0.90 or p1=0.80 p=0.95 > > > 2. Two arm parallel trial, outcome continuous. > > A power (y-axis) sample (x-axis) calculation graph for various failure proportions between trial arms. For example, m1= 100 and m2= 120 with equal sd1=sd2=10. It would be great if I could vary m1, m2, sd (always sd1=sd2) > You can do both of these using the -sampsi- command and could have found this yourself by typing -search sample size- into Stata. If you want to do the analysis for a range of values then you should consider putting each call within a series of nested -forval- loops and write the results to a file using -postfile- which you can then read into Stata and draw the graphs you want. I'll leave the actual coding of this as an exercise for you to work on ;-) Neil -- "One should as a rule, respect public opinion in so far as is necessary to avoid starvation and to keep out of prison, but anything that goes beyond this is voluntary submission to an unnecessary tyranny, and is likely to interfere with happiness in all kinds of ways..." - Bertrand Russell Email - nshephard@gmail.com Website - http://slack.ser.man.ac.uk/ Photos - http://www.flickr.com/photos/slackline/ * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:**Re: st: power calculation graphs***From:*Nikolaos Pandis <npandis@yahoo.com>

**AW: st: power calculation graphs***From:*"Martin Weiss" <martin.weiss1@gmx.de>

**References**:**st: power calculation graphs***From:*Nikolaos Pandis <npandis@yahoo.com>

- Prev by Date:
**AW: st: power calculation graphs** - Next by Date:
**st: Re: Random start to random number sequence** - Previous by thread:
**st: power calculation graphs** - Next by thread:
**AW: st: power calculation graphs** - Index(es):