Learn R Programming

EMMIXskew (version 1.0.3)

ddmvt: The Multivariate t-Distribution

Description

Density and random generation for Multivariate t-distributions with mean vector mean, covariance matrix cov, and degrees of freedom nu.

Usage

ddmvt(dat,n, p, mean, cov, nu)
rdmvt(    n, p, mean, cov, nu)

Arguments

dat

An n by p numeric matrix, the dataset

n

An integer, the number of observations

p

An integer, the dimension of data

mean

A length of p vector, the mean

cov

A p by p matrix, the covariance

nu

A positive number, the degrees of freedom

Value

ddmvt gives the density values; rdmvt generates the random numbers

See Also

rdemmix,ddmvn,ddmsn, ddmst,rdmvn,rdmsn, rdmst.

Examples

Run this code
# NOT RUN {
n <- 100
p <- 2

mean   <- rep(0,p)
cov    <- diag(p)
nu     <-  3

set.seed(3214)

x   <- rdmvt(    n,p,mean,cov,nu)

den <- ddmvt(x  ,n,p,mean,cov,nu)

# }

Run the code above in your browser using DataLab