Skip to content

Huynh-Feldt R vs SAS Bug

2 messages · Bela Bauer, Peter Dalgaard

#
Hi,

I'm using anova.mlm sphericity tests/corrections, and I'm getting 
different values than SAS. In order to be able to use these values for 
publications, I'd need to know more about the SAS bug that is mentioned 
in the Reference Manual.
- What exactly causes the different values?
- Is it just a slight difference, or can I expect significant 
differences in H-F/G-G epsilons and corrected p-Values? With the data 
sets I'm using, the SAS value for H-F epsilon is almost twice the value 
from R, and I'm wondering if there's a mistake on my side or if it is 
just caused by the SAS bug.

Thanks for any hints...

Bela
#
Bela Bauer <bela_b at gmx.net> writes:
R has

    HF.eps <- ((n + 1) * pp * GG.eps - 2)/(pp * (n - pp * GG.eps))

where n is the degrees of freedom for the SSD matrix and pp is the
dimension after transformation. As far as I could fathom from the SAS
output, SAS is using

    (N * pp * GG.eps - 2)/(pp * (n - pp * GG.eps))

which coincides with the above when n == N - 1. This suggests that
whoever coded up the SAS version generalised (N - 1) in the
denominator to DF but not the N in the numerator.

Some fairly simple invariance considerations show that the SAS formula
cannot be right - it's a bias correction for GG.eps which is
calculated from the eigenvalues of the SSD, and the distribution of
the SSD depends on degrees of freedom only.