Description Introduction Tensr functions References
This package provides a collection of functions for likelihood and equivariant inference for covariance matrices under the array normal model. Also included are functions for calculating tensor decompositions that are related to likelihood inference in the array normal model.
Let X be a multidimensional array (also called a tensor) of K dimensions. This package provides a series of functions to perform statistical inference when
vec(X) \sim N(0,Σ),
where Σ is assumed to be Kronecker structured. That is, Σ is the Kronecker product of K covariance matrices, each of which has the interpretation of being the covariance of X along its kth mode, or dimension.
Pay particular attention to the zero mean assumption. That is,
you need to de-mean your data prior to applying these
functions. If you have more than one sample, X_i for i
= 1,…,n, then you can concatenate these tensors along a
(K+1)th mode to form a new tensor Y and apply the
demean_tensor()
function to Y which will return a tensor
that satisfies the mean-zero assumption.
The details of the methods in this package can be found in Gerard and Hoff (2015) and Gerard and Hoff (2016).
amprod
k-mode product.
anorm_cd
Array normal conditional distributions.
array_bic_aic
Calculate the AIC and BIC.
arrIndices
Array indices.
atrans
Tucker product.
collapse_mode
Collapse multiple modes into one mode.
convert_cov
Convert the output from equi_mcmc
to
component covariance matrices.
demean_tensor
Demeans array data.
equi_mcmc
Gibbs sampler using an invariant prior.
fnorm
Frobenius norm of an array.
get_equi_bayes
Get the Bayes rule under multiway Stein's
loss.
get_isvd
Calculate the incredible SVD (ISVD).
holq
Calculate the incredible higher-order LQ decomposition
(HOLQ).
hooi
Calculate the higher-order orthogonal iteration (HOOI).
hosvd
Calculate the (truncated) higher-order SVD (HOSVD).
Kom
Commutation matrix.
ihop
The incredible higher-order polar decomposition (IHOP).
ldan
Log-likelihood of array normal model.
listprod
Element-wise matrix products between two lists.
lq
LQ decomposition.
lrt_null_dist_dim_same
Draw from null distribution of
likelihood ratio test statistic.
lrt_stat
Calculate the likelihood ratio test statistic.
mat
Unfold a matrix.
mhalf
The symmetric square root of a positive definite
matrix.
mle_from_holq
Get MLE from output of holq
.
multi_stein_loss
Calculate multiway Stein's loss from square
root matrices.
multi_stein_loss_cov
Calculate multiway Stein's loss from
component covariance matrices.
multiway_takemura
Calculate a truncated multiway Takemura
estimator.
polar
The left polar decomposition.
qr2
QR Decomposition.
random_ortho
Generate a list of orthogonal matrices drawn
from Haar distribution.
rmirror_wishart
Sample from the mirror-Wishart distribution.
sample_sig
Update for total variation parameter in
equi_mcmc
.
sample_right_wishart
Gibbs update of Phi_inv
.
start_ident
Get list of identity matrices.
start_resids
Sample covariance matrices for each mode.
tsum
Tucker sum.
tr
Trace of a matrix.
trim
Truncates small numbers to 0.
Gerard, D., & Hoff, P. (2016). A higher-order LQ decomposition for separable covariance models. Linear Algebra and its Applications, 505, 57-84. https://doi.org/10.1016/j.laa.2016.04.033 http://arxiv.org/pdf/1410.1094v1.pdf
Gerard, D., & Hoff, P. (2015). Equivariant minimax dominators of the MLE in the array normal model. Journal of Multivariate Analysis, 137, 32-49. https://doi.org/10.1016/j.jmva.2015.01.020 http://arxiv.org/pdf/1408.0424.pdf
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.