Description Usage Arguments Value Examples
Samples the matrix inverted-t distribution.
1 |
n |
sample size, a positive integer |
nu |
degrees of freedom, any positive number or an
integer strictly greater than |
M |
mean matrix, without constraints |
U |
columns covariance matrix, a positive semidefinite matrix of order equal
to |
V |
rows covariance matrix, a positive semidefinite matrix of order equal
to |
checkSymmetry |
logical, whether to check the symmetry of |
keep |
logical, whether to return an array with class keep |
A numeric three-dimensional array; simulations are stacked along the third dimension (see example).
1 2 3 4 5 6 7 8 9 10 11 | nu <- 0
m <- 2
p <- 3
M <- matrix(1, m, p)
U <- toeplitz(m:1)
V <- toeplitz(p:1)
ITsims <- rmatrixit(10000, nu, M, U, V)
dim(ITsims) # 2 3 10000
apply(ITsims, 1:2, mean) # approximates M
vecITsims <- t(apply(ITsims, 3, function(X) c(t(X))))
round(cov(vecITsims),2) # approximates 1/(nu+m+p-1) * kronecker(U,V)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.