Documentation Example 1 for PROC POWER
/****************************************************************/
/* S A S S A M P L E L I B R A R Y */
/* */
/* NAME: pwrex01 */
/* TITLE: Documentation Example 1 for PROC POWER */
/* (One-Way ANOVA) */
/* PRODUCT: STAT */
/* SYSTEM: ALL */
/* KEYS: power */
/* sample size */
/* power analysis */
/* analysis of variance */
/* graphs */
/* PROCS: POWER */
/* DATA: */
/* */
/* SUPPORT: John Castelloe */
/* REF: */
/* MISC: */
/****************************************************************/
proc power;
onewayanova
groupmeans = 35.6 | 33.7 | 30.2 | 29 28 | 25.9
stddev = 3.75
groupweights = (2 1 1 1 1)
alpha = 0.025
ntotal = .
power = 0.9
contrast = (4 -1 -1 -1 -1) (0 1 1 -1 -1)
(0 1 -1 0 0) (0 0 0 1 -1);
run;
ods graphics on;
proc power plotonly;
onewayanova
groupmeans = 35.6 | 33.7 | 30.2 | 29 28 | 25.9
stddev = 3.75
groupweights = (2 1 1 1 1)
alpha = 0.025
ntotal = .
power = 0.9
contrast = (4 -1 -1 -1 -1) (0 1 1 -1 -1)
(0 1 -1 0 0) (0 0 0 1 -1);
plot x=power min=.5 max=.95;
run;
proc power plotonly;
onewayanova
groupmeans = 35.6 | 33.7 | 30.2 | 29 28 | 25.9
stddev = 3.75
groupweights = (2 1 1 1 1)
alpha = 0.025
ntotal = 24
power = .
contrast = (4 -1 -1 -1 -1) (0 1 1 -1 -1)
(0 1 -1 0 0) (0 0 0 1 -1);
plot x=n min=24 max=480;
run;
ods graphics off;