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 |
Nikolaos Pandis <npandis@yahoo.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: power calculation graphs |

Date |
Fri, 20 Aug 2010 04:01:57 -0700 (PDT) |

Dear Neal and Martin, Thank you for the postings. I am aware of the sampsi family of commands, I just did not know how to write the do file in order to calculate all the different values from the -sampsi- to use for the graph. I will follow your recommendations. Again, many thanks. Nick --- On Fri, 8/20/10, Neil Shephard <nshephard@gmail.com> wrote: > From: Neil Shephard <nshephard@gmail.com> > Subject: Re: st: power calculation graphs > To: statalist@hsphsun2.harvard.edu > Date: Friday, August 20, 2010, 1:04 PM > 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/

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

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

- Prev by Date:
**Re: st: power calculation graphs** - Next by Date:
**Re: st: power calculation graphs** - Previous by thread:
**AW: st: power calculation graphs** - Next by thread:
**Re: st: power calculation graphs** - Index(es):