1

Spreadsheet and SPSS macro inputs

Partial $$\eta^text{2}$$ = $$ \frac{\mbox{SS(effect)}}{\mbox{SS(effect) + SS(its error)}}$$ where SS represents the sum of squares associated with a particular term in the anova.

In other words, partial $$\eta^text{2}$$ represents the proportion of variance in outcome predicted by the effect after adjusting for other terms in the anova. Click here for further details on partial $$\eta^text{2}$$ and here.

If the Sums of Squares are not available you canconstruct eta-squared.

Example input

Power can be computed using an EXCEL spreadsheet or the SPSS syntax below. Power analysis software using Winer (1991, pp 136-138) for balanced anovas may be downloaded from here with details of how to compute inputs here.

[ COPY AND PASTE THE SYNTAX IN THE BOX BELOW INTO A SPSS SYNTAX WINDOW AND RUN; ADJUST INPUT DATA AS REQUIRED]

DATA LIST free
/alpha num bsum wdf corr ntot rsq. 
BEGIN DATA. 
.05 2 1 2 0.0 60 0.0588
.05 2 1 2 0.3 67 0.0588
END DATA.
set errors=none. 
matrix.
get m /variables=alpha num bsum wdf corr ntot rsq  /missing=omit.
compute alpha=make(1,1,0).
compute num=make(1,1,0).
compute bsum=make(1,1,0).
compute wdf=make(1,1,0).
compute corr=make(1,1,0).
compute ntot=make(1,1,0).
compute rsq=make(1,1,0).
compute alpha=m(:,1).
compute num=m(:,2).
compute bsum=m(:,3).
compute wdf=m(:,4).
compute corr=m(:,5).
compute ntot=m(:,6).
compute rsq=(m:,7).  
end matrix.
compute denom = (ntot-1-bsum)*wdf.
COMPUTE power = 1 - NCDF.F(IDF.F(1-ALPHA,num,denom),num,denom,((NTOT-1-bsum)*wdf*RSQ/(1-RSQ))/(1-corr)).
EXE.
formats ntot (f7.0) alpha (f5.2) num (f5.2) denom (f5.2) corr
 (f5.2)rsq (f5.2) power (f5.2).
variable labels ntot 'Total Sample Size' /alpha 'Alpha' /num 'Numerator F' /denom 'Denominator F' /corr 'Correlation' /rsq 'R-squared' /power 'Power'.
report format=list automatic align(center)
  /variables=ntot alpha num denom corr rsq power 
  /title "ANOVA power, between subjects factor possibly in a mixed design for given total sample size" .

Reference

Doncaster CP and Davey AJH (2007) Analysis of covariance. How to choose and construct models for the life sciences. CUP:Cambridge.

Winer BJ, Brown DR and Michels KM (1991) Statistical principles in experimental design, 3rd edition. McGraw-Hill:New York.