DATA Fat; INPUT Fat Absorb; CARDS; 1 70 2 73.333 3 76.667 4 80 RUN; *ODS Listing Close; *Turn off Listing; Proc Mixed noprofile; Classes Fat; Model Absorb=Fat; Parms (100) /NoIter; Contrast '1 VS 2' Fat 1 -1 0 0; * ODS Output Tests3=anova; * ODS Output Contrasts=contr; make 'tests' out=anova; make 'contrast' out=contr; Data Power; Set anova contr; t=4; * if Effect ne ' ' then Source=Effect; * if Label ne ' ' then Source=Label; fvalue=f; numdf=ndf; dendf=ddf; ALPHA = 0.05; * The desired Type I error rate ; do n=6 to 25 by 1; DenDF=t*(n-1); FCRIT = FINV(1- ALPHA,NumDF, DenDF, 0); * The 0 represents non-centrality parameter ; NONCENT = N*NumDF*Fvalue; * The non-centrality parameter ; POWER = 1 - PROBF(FCRIT, NumDF, DenDF, NONCENT); output; end; run; *ODS Listing; PROC PRINT; var Source n numdf dendf NonCent Power; RUN;