Sample Size for One-Way ANOVA Model

Balanced Model

Either PROC POWER or PROC GLMPOWER can be used to calculate sample size.

Program Listing

OPTIONS PS=72 NODATE NONUMBER NOCENTER;

TITLE1 'Sample Size in One-Way ANOVA Model';
TITLE2 'Using PROC POWER';
PROC POWER;
  ONEWAYANOVA
    ALPHA = 0.05
	GROUPMEANS = 50 | 60 | 50 | 60
	STDDEV = 5
    POWER = 0.90
    NPERGROUP = .  * gives (common) group sample size;
    /* NTOTAL = . */   * gives total sample size;
* If NPERGROUP (or NTOTAL) is given a value with POWER
  specified as missing, then the procedure will
  calculate power of F test;
  ;
RUN;

TITLE2 'Using PROC GLMPOWER';
DATA size;
  INPUT Treatment $ Response @@;
  DATALINES;
  A 50    B 60    C 50    D 60
;
PROC GLMPOWER DATA=size;
  CLASS Treatment;
  MODEL Response = Treatment;
  POWER
    ALPHA = 0.05
    STDDEV = 5
	NTOTAL = .
	POWER = 0.90
  ;
RUN;

Output Listing

Sample Size in One-Way ANOVA Model
Using PROC POWER

The POWER Procedure
Overall F Test for One-Way ANOVA

     Fixed Scenario Elements

Method                       Exact
Alpha                         0.05
Group Means            50 60 50 60
Standard Deviation               5
Nominal Power                  0.9


Computed N Per Group

               
Actual    N Per
 Power    Group
 0.927        5



Sample Size in One-Way ANOVA Model
Using PROC GLMPOWER

The GLMPOWER Procedure

        Fixed Scenario Elements

Dependent Variable              Response
Source                         Treatment
Alpha                               0.05
Error Standard Deviation               5
Nominal Power                        0.9
Test Degrees of Freedom                3


    Computed N Total

                        
Error    Actual        N
   DF     Power    Total
   16     0.927       20