Data & AI Literacy Month
Hear from leaders powering AI transformation

LaplacesDemon (version 16.1.0)

dist.Multivariate.t.Precision: Multivariate t Distribution: Precision Parameterization

Description

These functions provide the density and random number generation for the multivariate t distribution, otherwise called the multivariate Student distribution. These functions use the precision parameterization.

Usage

dmvtp(x, mu, Omega, nu=Inf, log=FALSE)
rmvtp(n=1, mu, Omega, nu=Inf)

Arguments

x

This is either a vector of length k or a matrix with a number of columns, k, equal to the number of columns in precision matrix Ω.

n

This is the number of random draws.

mu

This is a numeric vector representing the location parameter, μ (the mean vector), of the multivariate distribution (equal to the expected value when df > 1, otherwise represented as ν>1). It must be of length k, as defined above.

Omega

This is a k×k positive-definite precision matrix Ω.

nu

This is the degrees of freedom ν, which must be positive.

log

Logical. If log=TRUE, then the logarithm of the density is returned.

Value

dmvtp gives the density and rmvtp generates random deviates.

Details

  • Application: Continuous Multivariate

  • Density: p(θ)=Γ((ν+k)/2)Γ(ν/2)νk/2πk/2|Ω|1/2(1+1ν(θμ)TΩ(θμ))(ν+k)/2

  • Inventor: Unknown (to me, anyway)

  • Notation 1: θtk(μ,Ω1,ν)

  • Notation 2: p(θ)=tk(θ|μ,Ω1,ν)

  • Parameter 1: location vector μ

  • Parameter 2: positive-definite k×k precision matrix Ω

  • Parameter 3: degrees of freedom ν>0

  • Mean: E(θ)=μ, for ν>1, otherwise undefined

  • Variance: var(θ)=νν2Ω1, for ν>2

  • Mode: 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.

It is usually parameterized with mean and a covariance matrix, or in Bayesian inference, with mean and a precision matrix, where the precision matrix is the matrix inverse of the covariance matrix. These functions provide the precision parameterization for convenience and familiarity. It is easier to calculate a multivariate t density with the precision parameterization, because a matrix inversion can be avoided.

This distribution has a mean parameter vector μ of length k, and a k×k precision matrix Ω, which must be positive-definite. When degrees of freedom ν=1, this is the multivariate Cauchy distribution.

See Also

dwishart, dmvc, dmvcp, dmvt, dst, dstp, and dt.

Examples

Run this code
# NOT RUN {
library(LaplacesDemon)
x <- seq(-2,4,length=21)
y <- 2*x+10
z <- x+cos(y) 
mu <- c(1,12,2)
Omega <- matrix(c(1,2,0,2,5,0.5,0,0.5,3), 3, 3)
nu <- 4
f <- dmvtp(cbind(x,y,z), mu, Omega, nu)
X <- rmvtp(1000, c(0,1,2), diag(3), 5)
joint.density.plot(X[,1], X[,2], color=TRUE)
# }

Run the code above in your browser using DataLab