From k@ro||@@koncev|c|u@ @end|ng |rom gm@||@com  Tue Jun 18 23:37:57 2019
From: k@ro||@@koncev|c|u@ @end|ng |rom gm@||@com (Karolis =?utf-8?Q?Koncevi=C4=8Dius?=)
Date: Wed, 19 Jun 2019 00:37:57 +0300
Subject: [Rd] Small bug in fligner.test - constant values can produce
 significant results (patch attached)
Message-ID: <20190618213754.q3d2lxj5ozpyagwa@PMW.local>

In specific cases fligner.test() can produce a small p-value even when both groups have constant variance.

Here is an illustration:

    fligner.test(c(1,1,2,2), c("a","a","b","b"))
    # p-value = NA

But:

    fligner.test(c(1,1,1,2,2,2), c("a","a","a","b","b","b"))
    # p-value < 2.2e-16

This can potentially get dangerous if people perform lots of parallel tests of this type (i.e. when doing a test for each gene in genomic studies).

Submitted a proposed patch that should solve the issue by producing an error "data is essentially constant"
- which is the same error message found in t-test under similar conditions.

P.S. First time writing to this list. Read all the guides of posting, but sorry in advance if I still missed any rules.

---
Karolis Koncevi?ius

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch.diff
URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20190619/0642547d/attachment.ksh>


[Rd] Small bug in fligner.test - constant values can produce significant results (patch attached)
Karolis =?utf-8?Q?Koncevi=C4=8Dius?=