dtmvt(tmvtnorm)
dtmvt()所属R语言包:tmvtnorm
Truncated Multivariate Student t Density
截断多元学生t密度
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This function provides the joint density function for the truncated multivariate Student t distribution with mean vector equal to mean, covariance matrix sigma, degrees of freedom parameter df and lower and upper truncation points lower and upper.
此功能提供了联合密度函数为截断多元学生t分布的均值向量等于mean,协方差矩阵sigma,程度的自由参数df和上限和下限截断点X>和lower。
用法----------Usage----------
dtmvt(x, mean = rep(0, nrow(sigma)), sigma = diag(length(mean)), df = 1,
lower = rep(-Inf, length = length(mean)),
upper = rep(Inf, length = length(mean)), log = FALSE)
参数----------Arguments----------
参数:x
Vector or matrix of quantiles. If x is a matrix, each row is taken to be a quantile.
矢量或矩阵位数。如果x是一个矩阵,每一行是一个位数。
参数:mean
Mean vector, default is rep(0, nrow(sigma)).
均值向量,默认是:rep(0, nrow(sigma))。
参数:sigma
Covariance matrix, default is diag(length(mean)).
协方差矩阵,默认是diag(length(mean))。
参数:df
degrees of freedom parameter
度的自由参数
参数:lower
Vector of lower truncation points, default is rep(-Inf, length = length(mean)).
矢量较低的截断点,默认是rep(-Inf, length = length(mean))。
参数:upper
Vector of upper truncation points, default is rep( Inf, length = length(mean)).
向量上的截断点,默认是rep( Inf, length = length(mean))。
参数:log
Logical; if TRUE, densities d are given as log(d).
逻辑,如果TRUE,密度d的log(D)。
Details
详细信息----------Details----------
The Truncated Multivariate Student t Distribution is a conditional Multivariate Student t distribution subject to (linear) constraints a ≤ \bold{x} ≤ b.
被截断的多元学生t分布是有条件的多元学生t分布(线性)的限制a ≤ \bold{x} ≤ b。
The density of the p-variate Multivariate Student t distribution with nu degrees of freedom is
密度p变量的多元学生t分布nu自由度是
The density of the truncated distribution f_{a,b}(x) with constraints a <= x <= b is accordingly
截断分布的密度f_{a,b}(x)有限制条件的a <= x <= b的是相应的
值----------Value----------
a numeric vector with density values
一个数值向量与密度值
(作者)----------Author(s)----------
Stefan Wilhelm <a href="mailto:wilhelm@financial.com">wilhelm@financial.com</a>
参考文献----------References----------
subject to linear constraints and the evaluation of constraint probabilities. http://www.biz.uiowa.edu/faculty/jgeweke/papers/paper47/paper47.pdf
Cambridge University Press
参见----------See Also----------
ptmvt and rtmvt for probabilities and random number generation in the truncated case, see dmvt, rmvt and pmvt for the untruncated multi-t distribution.
ptmvt和rtmvt的概率和随机数生成的截断的情况下,看到dmvt,rmvt和pmvt的untruncated-t分布的。
实例----------Examples----------
# Example[例子]
x1<-seq(-2, 3, by=0.1)
x2<-seq(-2, 3, by=0.1)
mean=c(0,0)
sigma=matrix(c(1, -0.5, -0.5, 1), 2, 2)
lower=c(-1,-1)
density<-function(x)
{
z=dtmvt(x, mean=mean, sigma=sigma, lower=lower)
z
}
fgrid <- function(x, y, f)
{
z <- matrix(nrow=length(x), ncol=length(y))
for(m in 1:length(x)){
for(n in 1:length(y)){
z[m,n] <- f(c(x[m], y[n]))
}
}
z
}
# compute multivariate-t density d for grid[计算多变量-T的密度d为网格]
d=fgrid(x1, x2, function(x) dtmvt(x, mean=mean, sigma=sigma, lower=lower))
# compute multivariate normal density d for grid[计算多因素对电网的正常密度d]
d2=fgrid(x1, x2, function(x) dtmvnorm(x, mean=mean, sigma=sigma, lower=lower))
# plot density as contourplot[图密度contourplot]
contour(x1, x2, d, nlevels=5, main="Truncated Multivariate t Density",
xlab=expression(x[1]), ylab=expression(x[2]))
contour(x1, x2, d2, nlevels=5, add=TRUE, col="red")
abline(v=-1, lty=3, lwd=2)
abline(h=-1, lty=3, lwd=2)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|