pmvnorm(mvtnorm)
pmvnorm()所属R语言包:mvtnorm
Multivariate Normal Distribution
多元正态分布
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Computes the distribution function of the multivariate normal distribution for arbitrary limits and correlation matrices.
计算任意限制和相关矩阵的多元正态分布的分布函数。
用法----------Usage----------
pmvnorm(lower=-Inf, upper=Inf, mean=rep(0, length(lower)),
corr=NULL, sigma=NULL, algorithm = GenzBretz(), ...)
参数----------Arguments----------
参数:lower
the vector of lower limits of length n.
的矢量长度为n的下限。
参数:upper
the vector of upper limits of length n.
的矢量长度为n的上限。
参数:mean
the mean vector of length n.
长度为n的均值向量。
参数:corr
the correlation matrix of dimension n.
相关矩阵的维数为n。
参数:sigma
the covariance matrix of dimension n. Either corr or sigma can be specified. If sigma is given, the problem is standardized. If neither corr nor sigma is given, the identity matrix is used for sigma.
n维的协方差矩阵。无论是corr或sigma可以指定。 sigma如果,问题是标准化的。如果没有corr,也不sigma,单位矩阵用于sigma。
参数:algorithm
an object of class GenzBretz, Miwa or TVPACK specifying both the algorithm to be used as well as the associated hyper parameters.
类的一个对象GenzBretz,Miwa或TVPACK指定要使用的算法,以及相关联的超参数。
参数:...
additional parameters (currently given to GenzBretz for backward compatibility issues).
额外的的参数(目前给GenzBretz“为了向后的兼容性问题)。
Details
详细信息----------Details----------
This program involves the computation of multivariate normal probabilities with arbitrary correlation matrices. It involves both the computation of singular and nonsingular probabilities. The implemented methodology is described in Genz (1992, 1993) (for algorithm GenzBretz), in Miwa et al. (2003) for algorithm Miwa (useful up to dimension 20) and Genz (2004) for the TVPACK algorithm (which covers 2- and 3-dimensional problems for semi-infinite integration regions).
该计划包括任意的相关矩阵多元正态分布的概率计算。它涉及的奇异和非奇异的概率计算。所实施的方法中描述的GENZ(1992,1993)(算法GenzBretz),Miwa系统等。 (2003)的算法三轮(有用的维度20)和GENZ(2004)(其中包括2 - 和3 - 维问题的半无限积分区域)为TVPACK算法。
Note that both -Inf and +Inf may be specified in lower and upper. For more details see pmvt.
需要注意的是两个-Inf和+Inf可以指定在lower和upper。有关详细信息,请参阅:pmvt。
The multivariate normal case is treated as a special case of pmvt with df=0 and univariate problems are passed to pnorm.
多元正常情况下,被视为一个特殊的情况下,pmvt与df=0和单变量的问题传递给pnorm。“
The multivariate normal density and random deviates are available using dmvnorm and rmvnorm.
多元正态分布的密度和随机偏离可以使用dmvnorm和rmvnorm。
值----------Value----------
The evaluated distribution function is returned with attributes
评估分布函数的返回属性
参数:error
estimated absolute error and
估计绝对误差和
参数:msg
status messages.
状态消息。
源----------Source----------
http://www.sci.wsu.edu/math/faculty/genz/homepage
参考文献----------References----------
Journal of Computational and Graphical Statistics, 1, 141–150.
normal probabilities. Computing Science and Statistics, 25, 400–405.
trivariate normal and t-probabilities, Statistics and Computing, 14, 251–260.
t Probabilities. Lecture Notes in Statistics, Vol. 195. Springer-Verlag, Heidelberg.
The evaluation of general non-centred orthant probabilities. Journal of the Royal Statistical Society, Ser. B, 65, 223–234.
参见----------See Also----------
qmvnorm
qmvnorm
实例----------Examples----------
n <- 5
mean <- rep(0, 5)
lower <- rep(-1, 5)
upper <- rep(3, 5)
corr <- diag(5)
corr[lower.tri(corr)] <- 0.5
corr[upper.tri(corr)] <- 0.5
prob <- pmvnorm(lower, upper, mean, corr)
print(prob)
stopifnot(pmvnorm(lower=-Inf, upper=3, mean=0, sigma=1) == pnorm(3))
a <- pmvnorm(lower=-Inf,upper=c(.3,.5),mean=c(2,4),diag(2))
stopifnot(round(a,16) == round(prod(pnorm(c(.3,.5),c(2,4))),16))
a <- pmvnorm(lower=-Inf,upper=c(.3,.5,1),mean=c(2,4,1),diag(3))
stopifnot(round(a,16) == round(prod(pnorm(c(.3,.5,1),c(2,4,1))),16))
# Example from R News paper (original by Genz, 1992):[例如从R的新闻纸(原来,1992年GENZ):]
m <- 3
sigma <- diag(3)
sigma[2,1] <- 3/5
sigma[3,1] <- 1/3
sigma[3,2] <- 11/15
pmvnorm(lower=rep(-Inf, m), upper=c(1,4,2), mean=rep(0, m), corr=sigma)
# Correlation and Covariance[相关“和”协方差“]
a <- pmvnorm(lower=-Inf, upper=c(2,2), sigma = diag(2)*2)
b <- pmvnorm(lower=-Inf, upper=c(2,2)/sqrt(2), corr=diag(2))
stopifnot(all.equal(round(a,5) , round(b, 5)))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|