Bookmark and Share

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]

Re: st: power calculation graphs


From   Nikolaos Pandis <[email protected]>
To   [email protected]
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 <[email protected]> wrote:

> From: Neil Shephard <[email protected]>
> Subject: Re: st: power calculation graphs
> To: [email protected]
> Date: Friday, August 20, 2010, 1:04 PM
> On Fri, Aug 20, 2010 at 8:54 AM,
> Nikolaos Pandis <[email protected]>
> 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 - [email protected]
> 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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index