density_t: Multivariate Student-t probability density function

Description Usage Arguments Value Examples

Description

Multivariate Student-t probability density function

Usage

1
density_t(x, nu, mu, Sigma_inv, logret = FALSE)

Arguments

x

A numeric matrix, each column of which is a point at which the density is to be evaluated.

nu

A positive integer, the degrees of freedom of the distribution.

mu

A numeric vector, the location parameter of the distribution.

Sigma_inv

A numeric matrix, the inverse of the scale matrix the of the variance-covariance matrix) of the distribution.

logret,

a logical value indicating whether to return the log density. Defaults to FALSE.

Value

A column vector whose jth element is the density of a multivariate Student-t with the specified parameters evaluated at the jth column of x. If logret is true, the natural logarithm of the density is returned.

Examples

1
2
3
4
5
M <- matrix(c(1, 0.5, 0.5, 1), 2, 2)
m <- c(0, 0)
df <- 20
density_t(cbind(c(0, 0), c(2, 2)), df, m, solve(M))
density_t(cbind(c(0, 0), c(2, 2)), df, m, solve(M), TRUE)

fditraglia/zoofactr documentation built on May 16, 2019, 12:12 p.m.