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

2021-01-24 Thread Karolis K
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 wrote: > >> Karo

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

2021-01-24 Thread Kurt Hornik
> 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 > # > #

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

2020-12-24 Thread Martin Maechler
Not sure If all of the variances are zero, they are homogenous in that sense, and I would give a p-value of 1 .. if only *some* of the variances are zero... it's less easy. I still would try to *not* give an error in such cases and even prefer NA statistic and p-value.. because yes, the

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

2020-12-23 Thread Karolis K
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-Kille

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

2020-12-21 Thread Kurt Hornik
> Karolis K writes: Any preferences? Best -k > Hello, > In certain cases fligner.test() returns NaN statistic and NA p-value. > The issue happens when, after centering with the median, all absolute values > become constant, which ten leads to identical ranks. > Below are a few examples: >

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

2020-12-19 Thread Karolis K
Hello, In certain cases fligner.test() returns NaN statistic and NA p-value. The issue happens when, after centering with the median, all absolute values become constant, which ten leads to identical ranks. Below are a few examples: # 2 groups, 2 values each # issue is caused by residual values