Re: [R] fligner.test

From: Ben Bolker <bolker_at_ufl.edu>
Date: Fri, 20 Jun 2008 16:33:27 +0000 (UTC)

Stefan Th. Gries <stgries <at> gmail.com> writes:

>
> Hi all
>
> I have a question regarding the Fligner-Killeen test. I am using
>
> - a PC with Windows XP (Build 20600.xpsp080413-2111 (Service Pack 3);
> - the following R version:
> > sessionInfo()
> R version 2.7.0 (2008-04-22)
> i386-pc-mingw32
>
> I have a vector LENGTH and a factor RELATION that are distributed like this:
>
> > table(LENGTH, RELATION)

> RELATION
> LENGTH object subject
[snip]
> > fligner.test(LENGTH[RELATION=="subject"], LENGTH[RELATION=="object"])
> Fligner-Killeen test of homogeneity of variances
> data: LENGTH[RELATION == "subject"] and LENGTH[RELATION == "object"]
> Fligner-Killeen:med chi-squared = 18.3552, df = 14, p-value = 0.1911
>
> > fligner.test(LENGTH[RELATION=="object"], LENGTH[RELATION=="subject"])
> Fligner-Killeen test of homogeneity of variances
> data: LENGTH[RELATION == "object"] and LENGTH[RELATION == "subject"]
> Fligner-Killeen:med chi-squared = 16.8838, df = 13, p-value = 0.2047
>
> > fligner.test(LENGTH~RELATION)
> Fligner-Killeen test of homogeneity of variances
> data: LENGTH by RELATION
> Fligner-Killeen:med chi-squared = 0.626, df = 1, p-value = 0.4288
> #########
>
> The order of the vectors etc. changes the results??? Needless to say
> this does not happen with var.test or ... Is this normal; if so, which
> one is the one to report?

  I think you misunderstood the manual page for fligner.test. I believe that all of the following should give identical results (corresponding to the last test in your examples):

fligner.test(list(LENGTH[RELATION=="subject"], LENGTH[RELATION=="object"]))
fligner.test(list(LENGTH[RELATION=="object"], LENGTH[RELATION=="subject"]))
fligner.test(LENGTH,RELATION)
fligner.test(LENGTH~RELATION)

______________________________________________
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. Received on Fri 20 Jun 2008 - 16:51:12 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 20 Jun 2008 - 18:30:55 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive