pchisq increase decimal accurancy

最后都变了- 提交于 2019-12-13 19:16:03

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!