Description Usage Arguments Details Value References See Also Examples
The probability density function and distribution function for the multivariate Student t distribution and mixtures of multivariate t distribution
1 2 3 |
dat |
for |
mu |
a numeric vector of length |
sigma |
a numeric positive definite matrix with dimension |
dof |
a positive real number specifying the degrees of freedom. If |
pro |
the mixing proportions; for |
log |
a logical value; if |
... |
parameters passed to |
known |
a list containing the parameters of the model.
If specified, it overwrites the values of |
method |
the method to use for computation of t distribution function. See description. |
There are three options in pmt
for computing multivariate t
distribution function values.
method=1
uses requires dof
to be an integer.
This provide interfaces to the Fortran-77 routines by Alan Genz.
This is the fastest method of the three options avilable.
method=2
uses linear interpolation technique to calculate
t distribution function values for a positive real dof
.
This method requires double the time of method 1.
method=3
uses a method described in Genz and Bretz (2002).
This is the more accurate method for a non-integer dof
,
but more computationally intensive than the other two methods.
The function dmt
computes the density value of a specified
multivariate t distribution. pmt
computes the distribution value
for a SINGLE point. dfmmt
returns a numeric vector of mixture density values.
Genz, A.: Fortran code in files mvt.f
and mvtdstpack.f
available at
http://www.math.wsu.edu/math/faculty/genz/software/
Genz, A. and Bretz, F. (2002). Comparison of Methods for the Numerical Computation of Multivariate t Probabilities. J. of Comput. Graph. Stat., 11:950-971,
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | x <- seq(-2,4,length=21)
y <- 2*x+10
z <- x+cos(y)
mu <- c(1,12,2)
sigma <- matrix(c(1,2,0,2,5,0.5,0,0.5,3), 3, 3)
dof <- 4
f <- dmt(cbind(x,y,z), mu, sigma,dof)
## Not run:
p1 <- pmt(c(2,11,3), mu, sigma, dof)
p2 <- pmt(c(2,11,3), mu, sigma, dof, maxpts=10000, abseps=1e-8)
## End(Not run)
obj <- list()
obj$mu <- list(c(17,19), c(5,22), c(6,10))
obj$sigma <- list(diag(2), matrix(c(2,0,0,1),2), matrix(c(3,7,7,24),2))
obj$dof <- c(1, 2, 3)
obj$pro <- c(0.25, 0.25, 0.5)
dfmmt(matrix(c(1,2,5,6,2,4),3,2), obj$mu, obj$sigma, obj$dof, obj$pro)
dfmmt(c(1,2), known=obj)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.