%newsas(sucrose3); title 'SUCROSE data set: Retrospective Power Analysis'; %include data(sucrose); * Data file from class disk; *include macros(power); * POWER macro; title2 'Retrospective Power Analysis'; *-- Do the ANOVA, obtain OUTSTAT= data set; proc GLM data=SUCROSE outstat=STATS; class SUGAR; model SPEED = SUGAR / SS3; contrast 'Linear' SUGAR -3 -1 1 3; contrast 'Quad ' SUGAR 1 -1 -1 1; contrast 'Cubic ' SUGAR -1 3 -3 1; run; proc print data=stats; title2 'OUTSTAT= data set from PROC GLM'; *rpower(data=stats, alpha=.01, /* significance level (default=.05) */ power=.95); /* desired power (default=.90) */ title2 'Power values and estimated sample sizes'; title3 'IF population means = sample means'; run; %power(data=stats, alpha=.01, effect=_all_);