pchisq 增加小数精度 [英] pchisq increase decimal accurancy

查看:38
本文介绍了pchisq 增加小数精度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法提高概率的小数精度分布.

Is there any way to increase the decimal accuracy for probability distributions.

> 1-pchisq(90, 5)
[1] 0

但是:

> pchisq(90, 5, lower.tail=F)
[1] 6.71932e-18

推荐答案

如果您正在执行 1 - foo 以获得分布的上尾,那么不要.而是使用 lower.tail 参数:

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

这篇关于pchisq 增加小数精度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆