mt {csampling} | R Documentation |
Multivariate Student t Distribution
Description
Density and random number generation for the multivariate Student t distribution.
Usage
dmt(x, df=stop("'df' argument is missing, with no default"),
mm=rep(0, length(x)), cov=diag(rep(1, length(x))))
rmt(n, df=stop("'df' argument is missing, with no default"),
mm=rep(0, mult), cov=diag(rep(1, mult)), mult, is.chol=FALSE)
Arguments
x |
a single multivariate observation. Missing values ( |
n |
the sample size. If |
df |
the degrees of freedom. In |
mult |
the dimension of the multivariate Student t variate. |
mm |
a vector location parameter. The default is a vector of 0's. |
cov |
a square scale matrix. The default is the identity matrix. |
is.chol |
logical flag. If |
Value
Returns the density (dmt
) of or a random sample (rmt
)
from the multivariate Student t distribution on df
degrees
of freedom.
Side Effects
The function rmt
causes creation of the dataset
.Random.seed
if it does not already exist,
otherwise its value is updated.
Background
The multivariate Student t distribution is a real valued symmetric
distribution centered at mm
. It is defined as the ratio of a
centred multivariate normal distribution with covariance matrix
cov
, and the square root of an independent
\chi^2
distribution with df
degrees of
freedom subsequently translated by mm
. (See
Johnson and Kotz, 1976, par. 37.3, pg. 134ff.)
The multivariate t distribution approaches the multivariate Gaussian
(Normal
) distribution as the degrees of freedom
go to infinity.
Note
Elements of x
that are missing will cause the corresponding
elements of the result to be missing.
References
Johnson, N. L. and Kotz, S. (1976) Distributions in Statistics: Continuous Multivariate Distributions. New York: Wiley.
See Also
Examples
dmt(c(0.1, -0.4), df = 4, mm = c(1, -1))
## density of a bivariate t distribution with 4 degrees of freedom
## and centered at (1,-1)
rmt(n = 100, df = 5, mult = 4)
## generates 100 replicates of a standard four-variate t distribution
## with 5 degress of freedom