mt {csampling} | R Documentation |
Density and random number generation for the multivariate Student t distribution.
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)
x |
a single multivariate observation. Missing values (NA s)
are allowed.
|
n |
the sample size. If length(n) is larger than 1, then
length(n) random vectors are returned, bound together in a
length(n) times mult matrix, where mult is
the dimension of the multivariate variable.
|
df |
the degrees of freedom. In rmt this is replicated to be
of the same length than the number of deviates generated by
rmt .
|
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 TRUE , the argument cov is the
result from the Choleski decomposition of the original scale
matrix.
|
Returns the density (dmt
) of or a random sample (rmt
)
from the multivariate Student t distribution on df
degrees
of freedom.
The function rmt
causes creation of the dataset
.Random.seed
if it does not already exist,
otherwise its value is updated.
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 square 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.
Elements of x
that are missing will cause the corresponding
elements of the result to be missing.
Johnson, N. L. and Kotz, S. (1976) Distributions in Statistics: Continuous Multivariate Distributions. New York: Wiley.
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