FAQ/power/owanova - CBU statistics Wiki

Revision 1 as of 2006-08-31 10:54:37

Clear message
location: FAQ / power / owanova

DATA LIST free
/alpha g ntot rsq. 
BEGIN DATA. 
.05 3 40  0.3
END DATA. 
matrix.
get m /variables=alpha g ntot rsq  /missing=omit.
compute alpha=make(1,1,0).
compute g=make(1,1,0).
compute ntot=make(1,1,0).
compute rsq=make(1,1,0).
compute alpha=m(:,1).
compute g=m(:,2).
compute ntot=m(:,3).
compute rsq=m(:,4).  
end matrix.
COMPUTE power = 1 - NCDF.F(IDF.F(1-ALPHA,G-1,NTOT-G),G-1,NTOT-G,NTOT*RSQ/(1-RSQ)).
EXE.
formats ntot (f7.0) alpha (f5.2) g (f5.2) rsq (f5.2) power (f5.2).
variable labels ntot 'Total Sample Size' /alpha 'Alpha' /rsq 'R-squared' /power 'Power'.
report format=list automatic align(center)
  /variables=ntot alpha g rsq power 
  /title "One way ANOVA power for given total sample size" .