Trnorm {Tlasso} | R Documentation |
Separable Tensor Normal Distribution
Description
Generate observations from separable tensor normal distribution.
Usage
Trnorm(
n,
m.vec,
mu = array(0, m.vec),
Sigma.list = NULL,
type = "Chain",
sd = 1,
knn = 4,
norm.type = 2
)
Arguments
n |
number of generated observations. |
m.vec |
vector of tensor mode dimensions, e.g., |
mu |
array of mean for tensor normal distribution with dimension |
Sigma.list |
list of covariance matrices in mode sequence. Default is |
type |
type of precision matrix, default is 'Chain'. Optional values are 'Chain' for
triangle graph and 'Neighbor' for nearest-neighbor graph. Useless if |
sd |
seed of random number generation, default is 1. |
knn |
sparsity of precision matrix, i.e., matrix is generated from a |
norm.type |
normalization method of precision matrix, i.e., |
Details
This function generates obeservations from separable tensor normal distribution and returns a m1 * ... * mK * n
array.
If Sigma.list
is not given, default distribution is from either triangle graph or nearest-neighbor graph (depends on type
).
Value
An array with dimension m_1 * ... * m_K * n.
Author(s)
Xiang Lyu, Will Wei Sun, Zhaoran Wang, Han Liu, Jian Yang, Guang Cheng.
See Also
Examples
m.vec = c(5,5,5) # dimensionality of a tensor
n = 5 # sample size
DATA=Trnorm(n,m.vec,type='Chain')
# a 5*5*5*10 array of oberservation from 5*5*5 separable tensor
# normal distribtuion with mean zero and
# precision matrices from triangle graph