Learn Data & AI Skills | 50% off
Get 50% off unlimited learning

ks (version 1.3.5)

rmvt.mixt, dmvt.mixt: Multivariate t mixture distribution

Description

Random generation and density values from multivariate t mixture distribution.

Usage

rmvt.mixt(n=100, mus=c(0,0), Sigmas=diag(2), dfs=7, props=1)
dmvt.mixt(x, mus, Sigmas, dfs, props)

Arguments

n
number of random variates
x
matrix of quantiles
mus
(stacked) matrix of location vectors
Sigmas
(stacked) matrix of dispersion matrices
dfs
vector of degrees of freedom
props
vector of mixing proportions

Value

  • Multivariate t mixture random vectors and density values.

Details

rmvt.mixt and dmvt.mixt are based on the rmvt and dmvt functions from the mvtnorm library.

The formula for a d-variate t density with location vector $\bold{\mu}$, dispersion matrix $\bold{\Sigma}$ and df degrees of freedom is k[1+1df(\boldx\boldμ)T\boldΣ1(\boldx\boldμ)](d+df)/2 where k=Γ((df+d)/2)(dfπ)d/2Γ(df/2)|\boldΣ1/2|.

See Also

rmvnorm.mixt, dmvnorm.mixt

Examples

Run this code
mus <- rbind(c(-3/2,0), c(3/2,0))
Sigmas <- rbind(diag(c(1/16, 1)), rbind(c(1/16, 1/18), c(1/18, 1/16)))
props <- c(2/3, 1/3)
dfs <- c(7,3)
x <- rmvt.mixt(1000, mus, Sigmas, dfs, props)
dens <- dmvt.mixt(x, mus, Sigmas, dfs, props)

Run the code above in your browser using DataLab