[R] levene.test

John Fox jfox at mcmaster.ca
Wed Jul 14 16:49:21 CEST 2010


Dear Marta,

> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
On
> Behalf Of martanair
> Sent: July-14-10 10:21 AM
> To: r-help at r-project.org
> Subject: Re: [R] levene.test
> 
> 
> how do I calculate the differences from the mean?
> 
> levene.test(filedati$y , filedati$fertilizzante, location="mean")
> 
> Is it right?

No. levene.test does not take a location argument, as you can see from its
help file, ?levene.test. 

If you really want to use the mean (why -- since the median works better?),
then you have already been given a couple of suggestions: (1) Use leveneTest
from the development version of the car package on R-Forge, which can be
installed via install.packages("car", repos="http://R-Forge.R-project.org"
(and which has an argument named center, not location). (2) Use the function
for Levene's test in the lawstat package. You could also modify the code for
levene.test.default in the car package to use the mean or to take a location
argument.

John

> regards
> marta
> --
> View this message in context: http://r.789695.n4.nabble.com/levene-test-
> tp2288632p2288832.html
> Sent from the R help mailing list archive at Nabble.com.
> 
> ______________________________________________
> R-help at 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.



More information about the R-help mailing list