问题
Is there any way to increase the decimal accuracy for probability distributions.
> 1-pchisq(90, 5)
[1] 0
But:
> pchisq(90, 5, lower.tail=F)
[1] 6.71932e-18
回答1:
If you are doing the 1 - foo to get the upper tail of the distribution, then don't. Instead use the lower.tail argument:
> pchisq(90, 5, lower.tail = FALSE)
[1] 6.719319e-18
来源:https://stackoverflow.com/questions/6704365/pchisq-increase-decimal-accurancy