dist.Multivariate.t.Cholesky {LaplacesDemon} | R Documentation |
Multivariate t Distribution: Cholesky Parameterization
Description
These functions provide the density and random number generation for the multivariate t distribution, otherwise called the multivariate Student distribution, given the Cholesky parameterization.
Usage
dmvtc(x, mu, U, df=Inf, log=FALSE)
rmvtc(n=1, mu, U, df=Inf)
Arguments
x |
This is either a vector of length |
n |
This is the number of random draws. |
mu |
This is a numeric vector or matrix representing the location
parameter, |
U |
This is the |
df |
This is the degrees of freedom, and is often represented
with |
log |
Logical. If |
Details
Application: Continuous Multivariate
Density:
Inventor: Unknown (to me, anyway)
Notation 1:
Notation 2:
Parameter 1: location vector
Parameter 2: positive-definite
scale matrix
Parameter 3: degrees of freedom
(df in the functions)
Mean:
, for
, otherwise undefined
Variance:
, for
Mode:
The multivariate t distribution, also called the multivariate Student or
multivariate Student t distribution, is a multidimensional extension of the
one-dimensional or univariate Student t distribution. A random vector is
considered to be multivariate t-distributed if every linear
combination of its components has a univariate Student t-distribution.
This distribution has a mean parameter vector of length
, and an upper-triangular
matrix that is
Cholesky factor
, as per the
chol
function for Cholesky decomposition. When degrees of freedom
, this is the multivariate Cauchy distribution.
In practice, is fully unconstrained for proposals
when its diagonal is log-transformed. The diagonal is exponentiated
after a proposal and before other calculations. Overall, the Cholesky
parameterization is faster than the traditional parameterization.
Compared with
dmvt
, dmvtc
must additionally
matrix-multiply the Cholesky back to the scale matrix, but it
does not have to check for or correct the scale matrix to
positive-definiteness, which overall is slower. The same is true when
comparing rmvt
and rmvtc
.
Value
dmvtc
gives the density and
rmvtc
generates random deviates.
Author(s)
Statisticat, LLC. software@bayesian-inference.com
See Also
chol
,
dinvwishartc
,
dmvc
,
dmvcp
,
dmvtp
,
dst
,
dstp
, and
dt
.
Examples
library(LaplacesDemon)
x <- seq(-2,4,length=21)
y <- 2*x+10
z <- x+cos(y)
mu <- c(1,12,2)
S <- matrix(c(1,2,0,2,5,0.5,0,0.5,3), 3, 3)
U <- chol(S)
df <- 4
f <- dmvtc(cbind(x,y,z), mu, U, df)
X <- rmvtc(1000, c(0,1,2), U, 5)
joint.density.plot(X[,1], X[,2], color=TRUE)