Ravi Kulkarni wrote:> Hello,
> I notice that when I do Levene's test to test equality of variances
across
> levels of a factor, I get different answers in R and SPSS 16.
> e.g.: For the chickwts data, in R, levene.test(weight, feed) gives
> F=0.7493, p=0.5896.
> SPSS 16 gives F=0.987, p=0.432
>
> Why this difference? Which one should I believe? (I would like to believe
> R :)
When in doubt, believe R.
Which levene.test() are you using? There are at least three
functions by that name (packages car, lawstat, s20x; you
should always state which package is being used).
All default to what I would consider to be the better test,
namely using the median as location measure. lawstat gives
you options: try it with location="mean".
Then switch to the Fligner-Killeen test (fligner.test() in
package 'stats'). The reference cited in ?fligner.test makes
for good reading.
-Peter Ehlers
>
> Ravi