Mvt {mvtnorm} | R Documentation |
These functions provide information about the multivariate t
distribution with non-centrality parameter (or mode) delta
,
covariance matrix sigma
and degrees of freedom df
.
dmvt
gives the density and rmvt
generates random deviates.
rmvt(n, sigma = diag(2), df = 1, delta = rep(0, nrow(sigma)), type = c("shifted", "Kshirsagar")) dmvt(x, delta, sigma, df = 1, log = TRUE, type = "shifted")
x |
Vector or matrix of quantiles. If x is a matrix, each
row is taken to be a quantile. |
n |
Number of observations. |
delta |
the vector of noncentrality parameters of length n, for
type = "shifted" delta specifies the mode. |
sigma |
Covariance matrix, default is diag(ncol(x)) . |
df |
degree of freedom as integer. |
log |
Logical; if TRUE , densities d are given as log(d). |
type |
type of the noncentral multivariate t distribution
to be computed. type = "Kshirsagar" corresponds
to formula (1.4) in Genz and Bretz (2009) (see also
Chapter 5.1 in Kotz and Nadarajah (2004)). This is the
noncentral t-distribution needed for calculating
the power of multiple contrast tests under a normality
assumption. type = "shifted" corresponds to the
formula right before formula (1.4) in Genz and Bretz (2009)
(see also formula (1.1) in Kotz and Nadarajah (2004)). It
is a location shifted version of the central t-distribution.
This noncentral multivariate t distribution appears for
example as the Bayesian posterior distribution
for the regression coefficients in a linear regression.
In the central case both types coincide.
Note that the defaults differ from the default
in pmvt (for reasons of backward
compatibility).
|
For type = "shifted" the following density is implemented
c(1+(x-δ)'S^{-1}(x-δ)/ν)^{-(ν+m)/2},
where
c = Γ((ν+m)/2)/((π ν)^{m/2}Γ(ν/2)|S|^{1/2}),
here S is a positive definite symmetric matrix (which might be the correlation or the covariance matrix), delta is the non-centrality vector and ν are the degrees of freedom.
dmvt(x=c(0,0), sigma = diag(2)) x <- rmvt(n=100, sigma = diag(2), df = 3) plot(x)