On Wed, 2010-07-14 at 05:47 -0700, martanair wrote: > the value of the F-test is uncorrect. > If I calculate the Levene's Test for Homogeneity of Variance with SPSS I get > F = 5.128 Pr (> F) = 0.033 > Why? > what is the exact formula which R calculate Levene's test for two groups? > Thanks > marta
Who says SPSS is correct and that levene.test isn't? ;-) Please don't make such statements when you clearly don't know what it is that the R code is computing. There are quite a few "versions" of Levene's test and R and SPSS may not be implementing the same thing. require(car) car:::levene.test.default Will show you the source code. Read ?levene.test to see what it is doing, in particular: Details: The version of Levene's test implemented here is based on absolute deviations from the group medians. Other, less robust, versions, not implemented, are based on absolute deviations from group means or trimmed means. As far as I can tell, my reading of the code show using the above R call is doing exactly what it was supposed to; i.e. ANOVA of the deviations from group medians with group identifier as the sole covariate. Can you look at the SPSS code for this and verify that what it is doing is likewise correct? (Genuine Q as I don't own, nor have ever used SPSS). G -- %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% Dr. Gavin Simpson [t] +44 (0)20 7679 0522 ECRC, UCL Geography, [f] +44 (0)20 7679 0565 Pearson Building, [e] gavin.simpsonATNOSPAMucl.ac.uk Gower Street, London [w] http://www.ucl.ac.uk/~ucfagls/ UK. WC1E 6BT. [w] http://www.freshwaters.org.uk %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.