This thread Why can't I get a p-value smaller than 2.2e-16?, begins to answer my problem however my issue is with using the F-distribution to generate p-value less than 2.2e-16.
1-pf(50,3,200)
[1] 0
My goal is to effectively mimic the levene.test
from the lawstat
package but wrapping the "lite" function in apply to allow 10-100,000 of calculation more efficiently.
I have achieved this but have the issue with a few p-value < 2.2e-16. The levene.test
function, which employs the anova
function is able to deal with these.
Other than going back to my function and editing it to using the anova
function over pf
, does anyone have any ideas why the pf
is limited by anova
isn't.
If I use the anova
function it would double the runtime