[Rd] Silent failure with NA results in fligner.test()

Karolis K k@ro||@@koncev|c|u@ @end|ng |rom gm@||@com
Sun Jan 24 17:57:05 CET 2021


Thank you a lot for the update.

I understand leaving NaN/NA in these cases, that can make sense.
But feels to me that this situation could maybe produce a warning, to inform the user of what had happened?

Kind regards,
Karolis K.

> On Jan 24, 2021, at 6:52 PM, Kurt Hornik <Kurt.Hornik using wu.ac.at> wrote:
> 
>>>>>> Karolis K writes:
> 
>> To me it seems like returning chi-sq = 0 and p-value = 1 would make sense.
>> It would also be consistent with other scenarios of equal variance in all
>> groups. One example:
> 
>> fligner.test(1:8, gl(2,4))
>> #        Fligner-Killeen test of homogeneity of variances
>> #
>> # data:  1:8 and gl(2, 4)
>> # Fligner-Killeen:med chi-squared = 0, df = 1, p-value = 1
> 
>> But I am aware that other tests implemented in stats:: sometimes throw
>> errors in similar situations.
> 
>> Maybe someone more familiar with the behaviour and philosophy behind
>> stats:: preferences can add more weight here?
> 
> Thanks for spotting this.  After some internal discussions, we've come
> to the conclusion that there is no "obvious" way to handle situations
> where the Fligner-Killeen:med chi-squared test statistic is undefined
> (i.e., when the denominator is zero).  [Owing to the discreteness of the
> ranks, trying to take limits will not work.]  For now, these
> sitatuations consistently give NaN/NA instead of errors (and the numeric
> computations were improved so that it should no longer possible to get a
> zero denominator and a non-zero numerator).
> 
> Best
> -k
> 
>> Warm regards,
>> Karolis K.
> 
>> 	[[alternative HTML version deleted]]
> 
>> ______________________________________________
>> R-devel using r-project.org <mailto:R-devel using r-project.org> mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel <https://stat.ethz.ch/mailman/listinfo/r-devel>

	[[alternative HTML version deleted]]



More information about the R-devel mailing list