# Repeated Measures ANOVA with Huynh and Feldt Epsilon Correction

The test statistics is:

${\displaystyle F={\frac {\sum _{j=1}^{s}\sum _{i=1}^{n_{j}}w_{ij}({\bar {x}}_{j}-{\bar {x}})^{2}/(j-1)}{\sum _{j=1}^{s}\sum _{i=1}^{n_{j}}w_{ij}({\bar {x}}_{j}-x_{ij})^{2}/((\sum _{j=1}^{s}\sum _{i=1}^{n_{j}}w_{ij}-1)(j-1))}}}$

where:

${\displaystyle x_{ij}}$ is the value of the ${\displaystyle i}$th of ${\displaystyle n_{j}}$ observations in the ${\displaystyle j}$th of ${\displaystyle s}$ groups, where ${\displaystyle x_{ij}}$ has been 'centered' such that ${\displaystyle \sum _{j=1}^{s}x_{ij}=0\forall i}$,
${\displaystyle {\bar {x}}_{j}}$ is the average in the ${\displaystyle j}$th group,
${\displaystyle {\bar {x}}}$ is the overall average,
${\displaystyle w_{ij}}$ is the calibrated weight,
${\displaystyle p\approx \Pr(F_{(s-1)\epsilon ,(\sum _{j=1}^{s}\sum _{i=1}^{n_{j}}w_{ij}-1)(s-1))\epsilon }\geq F)}$, and
${\displaystyle \epsilon }$ is computed using the Greenhouse-Geisser method.[1]

and ${\displaystyle F}$ is evaulated using the F-distribution with ${\displaystyle (j-1)\epsilon }$ and ${\displaystyle ((\sum _{j=1}^{s}\sum _{i=1}^{n_{j}}w_{ij}-1)(j-1))\epsilon }$ degrees of freedom, where ${\displaystyle \epsilon =1/(j-1)}$.