Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.

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

From |
"Martin Weiss" <martin.weiss1@gmx.de> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
AW: st: power calculation graphs |

Date |
Fri, 20 Aug 2010 12:07:46 +0200 |

<> Re -postfile-, also see http://www.michaelnormanmitchell.com/stow/month/march-2010 HTH Martin -----Ursprüngliche Nachricht----- Von: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Neil Shephard Gesendet: Freitag, 20. August 2010 12:04 An: statalist@hsphsun2.harvard.edu Betreff: Re: st: power calculation graphs 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/ * * 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/

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

**Re: st: power calculation graphs***From:*Neil Shephard <nshephard@gmail.com>

- Prev by Date:
**st: RE: AW: RE: F-test Stata reg..., robust** - Next by Date:
**Re: st: power calculation graphs** - Previous by thread:
**Re: st: power calculation graphs** - Next by thread:
**Re: st: power calculation graphs** - Index(es):