Resources

Getting Started Example 2 for PROC POWER

/****************************************************************/
/*          S A S   S A M P L E   L I B R A R Y                 */
/*                                                              */
/*    NAME: pwrgs2                                              */
/*   TITLE: Getting Started Example 2 for PROC POWER            */
/*          (Determining Required Sample Size for a Two-Sample  */
/*          t Test)                                             */
/* PRODUCT: STAT                                                */
/*  SYSTEM: ALL                                                 */
/*    KEYS: power                                               */
/*          power analysis                                      */
/*   PROCS: POWER                                               */
/*    DATA:                                                     */
/*                                                              */
/* SUPPORT: John Castelloe                                      */
/*     REF:                                                     */
/*    MISC: Graphs produced by ODS Graphics in PROC POWER       */
/*          require a style that distinguishes curves based     */
/*          on a combination of color, line style, and symbol   */
/*          marker.  Styles that are well-suited for use in     */
/*          PROC POWER include: STATISTICAL, ANALYSIS, DEFAULT, */
/*          LISTING, and HTMLBLUECML.                           */
/****************************************************************/

proc power;
   twosamplemeans
      groupmeans   = (13 14) (13 14.5) (13 15)
      stddev       = 1.2 1.7
      groupweights = 1 | 1 2 3
      power        = 0.9
      ntotal       = .;
run;

proc power;
   twosamplemeans
      nfractional
      meandiff     = 1 to 2 by 0.5
      stddev       = 1.2 1.7
      groupweights = (1 1) (1 2) (1 3)
      power        = 0.9
      ntotal       = .;
run;