Documentation Example 2 for PROC GLMPOWER
/****************************************************************/
/* S A S S A M P L E L I B R A R Y */
/* */
/* NAME: gmpex02 */
/* TITLE: Documentation Example 2 for PROC GLMPOWER */
/* (Two-Way ANOVA with Covariates) */
/* PRODUCT: STAT */
/* SYSTEM: ALL */
/* KEYS: power */
/* power analysis */
/* sample size */
/* graphs */
/* general linear models */
/* analysis of variance */
/* ANCOVA */
/* analysis of covariance */
/* PROCS: GLMPOWER */
/* DATA: */
/* */
/* SUPPORT: John Castelloe */
/* REF: */
/* MISC: Graphs produced by ODS Graphics in PROC GLMPOWER */
/* 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 GLMPOWER include: STATISTICAL, ANALYSIS, */
/* DEFAULT, LISTING, and HTMLBLUECML. */
/****************************************************************/
data Fluids2;
input Altitude $ Fluid $ LacticAcid CellWgt;
datalines;
High Water 36.9 4
High EZD1 35.0 2
High EZD2 31.5 2
High LZ1 30 2
High LZ2 27.1 2
Low Water 34.3 6
Low EZD1 32.4 3
Low EZD2 28.9 3
Low LZ1 27 3
Low LZ2 24.7 3
;
proc glmpower data=Fluids2;
class Altitude Fluid;
model LacticAcid = Altitude Fluid;
weight CellWgt;
contrast "Water vs. others" Fluid -1 -1 -1 -1 4;
contrast "EZD vs. LZ" Fluid 1 1 -1 -1 0;
contrast "EZD1 vs. EZD2" Fluid 1 -1 0 0 0;
contrast "LZ1 vs. LZ2" Fluid 0 0 1 -1 0;
power
nfractional
stddev = 3.5
ncovariates = 1
corrxy = 0.2 0.3 0
alpha = 0.025
ntotal = .
power = 0.9;
run;
*
ods listing style=htmlbluecml;
ods graphics on;
proc glmpower data=Fluids2 plotonly;
class Altitude Fluid;
model LacticAcid = Altitude Fluid;
weight CellWgt;
contrast "Water vs. others" Fluid -1 -1 -1 -1 4;
contrast "EZD vs. LZ" Fluid 1 1 -1 -1 0;
contrast "EZD1 vs. EZD2" Fluid 1 -1 0 0 0;
contrast "LZ1 vs. LZ2" Fluid 0 0 1 -1 0;
power
nfractional
stddev = 3.5
ncovariates = 1
corrxy = 0.2 0.3 0
alpha = 0.025
ntotal = .
power = 0.9;
plot x=power min=.5 max=.95;
run;
proc glmpower data=Fluids2 plotonly;
class Altitude Fluid;
model LacticAcid = Altitude Fluid;
weight CellWgt;
contrast "Water vs. others" Fluid -1 -1 -1 -1 4;
contrast "EZD vs. LZ" Fluid 1 1 -1 -1 0;
contrast "EZD1 vs. EZD2" Fluid 1 -1 0 0 0;
contrast "LZ1 vs. LZ2" Fluid 0 0 1 -1 0;
power
nfractional
stddev = 3.5
ncovariates = 1
corrxy = 0.2 0.3 0
alpha = 0.025
ntotal = 21
power = .;
plot x=n min=21 max=275;
run;
ods graphics off;