qtmvnorm-marginal(tmvtnorm)
qtmvnorm-marginal()所属R语言包:tmvtnorm
Quantiles of the Truncated Multivariate Normal Distribution in one dimension
位数的截断多元正态分布的一维
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Computes the equicoordinate quantile function of the truncated multivariate normal distribution for arbitrary correlation matrices based on an inversion of the algorithms by Genz and Bretz.
分位数的功能计算的equicoordinate的GENZ和Bretz反转的算法基础上的任意相关矩阵的截断多元正态分布。
用法----------Usage----------
qtmvnorm.marginal(p,
interval = c(-10, 10),
tail = c("lower.tail","upper.tail","both.tails"),
n=1,
mean=rep(0, nrow(sigma)),
sigma=diag(length(mean)),
lower=rep(-Inf, length = length(mean)),
upper=rep( Inf, length = length(mean)),
...)
参数----------Arguments----------
参数:p
probability.
概率。
参数:interval
a vector containing the end-points of the interval to be searched by uniroot.
一个向量,包含要搜索的uniroot结束点的时间间隔。
参数:tail
specifies which quantiles should be computed. lower.tail gives the quantile x for which P[X <= x] = p, upper.tail gives x with P[X > x] = p and both.tails leads to x with P[-x ≤ X ≤ x] = p. </table>
指定应计算的位数。 lower.tail给位数x,P[X <= x] = p,upper.tail给xP[X > x] = p和both.tails导致x P[-x ≤ X ≤ x] = p。 </ TABLE>
参数:n
index (1..n) to calculate marginal quantile for
指数(1 .. n)的计算边际位数
参数:mean
the mean vector of length 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。
参数: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))。
参数:...
additional parameters to be passed to uniroot.
额外的参数传递给uniroot。
Details
详细信息----------Details----------
Only equicoordinate quantiles are computed, i.e., the quantiles in each dimension coincide. Currently, the distribution function is inverted by using the uniroot function which may result in limited accuracy of the quantiles.
位数只有equicoordinate位数计算,即在每个维度上是一致的。目前,分布函数反转使用uniroot函数,这可能会导致在有限的精度的位数。
值----------Value----------
A list with four components: quantile and f.quantile give the location of the quantile and the value of the function evaluated at that point. iter and estim.prec give the number of iterations used and an approximate estimated precision from uniroot.
有四个分量的列表:quantile和f.quantile位数和评价在该点的值的函数得到的位置。 iter和estim.prec从uniroot使用的迭代数和近似估计的精度。
参见----------See Also----------
ptmvnorm, pmvnorm
ptmvnorm,pmvnorm
实例----------Examples----------
# finite dimensional distribution of the Geometric Brownian Motion log-returns [有限维分布的几何布朗运动登录返回]
# with truncation[与截断]
# volatility p.a.[波动率(每年)]
sigma=0.4
# risk free rate[无风险利率]
r = 0.05
# n=3 points in time[n = 3时的时间点]
T <- c(0.5, 0.7, 1)
# covariance matrix of Geometric Brownian Motion returns[协方差矩阵的几何布朗运动的回报]
Sigma = sigma^2*outer(T,T,pmin)
# mean vector of the Geometric Brownian Motion returns[均值向量的几何布朗运动的回报]
mu = (r - sigma^2/2) * T
# lower truncation vector a (a<=x<=b)[较低的截短向量(<= <=)]
a = rep(-Inf, 3)
# upper truncation vector b (a<=x<=b)[上部截断矢量b(<= <=)]
b = c(0, 0, Inf)
# quantile of the t_1 returns[分位数的T_1回报]
qtmvnorm.marginal(p=0.95, interval = c(-10, 10), tail = "lower.tail", n=1,
mean = mu, sigma = Sigma, lower=a, upper=b)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|