dist_multivariate_t: The multivariate t-distribution

View source: R/dist_multivariate_t.R

dist_multivariate_tR Documentation

The multivariate t-distribution

Description

[Stable]

The multivariate t-distribution is a generalization of the univariate Student's t-distribution to multiple dimensions. It is commonly used for modeling heavy-tailed multivariate data and in robust statistics.

Usage

dist_multivariate_t(df = 1, mu = 0, sigma = diag(1))

Arguments

df

A numeric vector of degrees of freedom (must be positive).

mu

A list of numeric vectors for the distribution location parameter.

sigma

A list of matrices for the distribution scale matrix.

Details

We recommend reading this documentation on pkgdown which renders math nicely. https://pkg.mitchelloharawild.com/distributional/reference/dist_multivariate_t.html

In the following, let \mathbf{X} be a multivariate t random vector with degrees of freedom df = \nu, location parameter mu = \boldsymbol{\mu}, and scale matrix sigma = \boldsymbol{\Sigma}.

Support: \mathbf{x} \in \mathbb{R}^k, where k is the dimension of the distribution

Mean: \boldsymbol{\mu} for \nu > 1, undefined otherwise

Covariance matrix:

\text{Cov}(\mathbf{X}) = \frac{\nu}{\nu - 2} \boldsymbol{\Sigma}

for \nu > 2, undefined otherwise

Probability density function (p.d.f):

f(\mathbf{x}) = \frac{\Gamma\left(\frac{\nu + k}{2}\right)} {\Gamma\left(\frac{\nu}{2}\right) \nu^{k/2} \pi^{k/2} |\boldsymbol{\Sigma}|^{1/2}} \left[1 + \frac{1}{\nu}(\mathbf{x} - \boldsymbol{\mu})^T \boldsymbol{\Sigma}^{-1} (\mathbf{x} - \boldsymbol{\mu})\right]^{-\frac{\nu + k}{2}}

where k is the dimension of the distribution and \Gamma(\cdot) is the gamma function.

Cumulative distribution function (c.d.f):

F(\mathbf{t}) = \int_{-\infty}^{t_1} \cdots \int_{-\infty}^{t_k} f(\mathbf{x}) \, d\mathbf{x}

This integral does not have a closed form solution and is approximated numerically.

Quantile function:

The equicoordinate quantile function finds q such that:

P(X_1 \leq q, \ldots, X_k \leq q) = p

This does not have a closed form solution and is approximated numerically.

The marginal quantile function for each dimension i is:

Q_i(p) = \mu_i + \sqrt{\Sigma_{ii}} \cdot t_{\nu}^{-1}(p)

where t_{\nu}^{-1}(p) is the quantile function of the univariate Student's t-distribution with \nu degrees of freedom, and \Sigma_{ii} is the i-th diagonal element of sigma.

See Also

mvtnorm::dmvt, mvtnorm::pmvt, mvtnorm::qmvt, mvtnorm::rmvt

Examples

dist <- dist_multivariate_t(
  df = 5,
  mu = list(c(1, 2)),
  sigma = list(matrix(c(4, 2, 2, 3), ncol = 2))
)
dimnames(dist) <- c("x", "y")
dist


mean(dist)
variance(dist)
support(dist)
generate(dist, 10)

density(dist, cbind(2, 1))
density(dist, cbind(2, 1), log = TRUE)

cdf(dist, 4)

quantile(dist, 0.7)
quantile(dist, 0.7, kind = "marginal")


distributional documentation built on June 11, 2026, 9:07 a.m.