Trnorm: Separable Tensor Normal Distribution

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/Trnorm.R

Description

Generate observations from separable tensor normal distribution.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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., m.vec=c(m1, m2, m3) for a 3-mode tensor normal distribution.

mu

array of mean for tensor normal distribution with dimension m.vec. Default is zero mean.

Sigma.list

list of covariance matrices in mode sequence. Default is NULL.

type

type of precision matrix, default is 'Chain'. Optional values are 'Chain' for triangle graph and 'Neighbor' for nearest-neighbor graph. Useless if Sigma.list is not NULL.

sd

seed of random number generation, default is 1.

knn

sparsity of precision matrix, i.e., matrix is generated from a knn nearest-neighbor graph. Default is 4. Useless if type='Chain' or Sigma.list is not NULL.

norm.type

normalization method of precision matrix, i.e., Ω_{11}=1 if norm.type = 1 and ||Ω||_F =1 if norm.type = 2. Default value is 2.

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

ChainOmega, NeighborOmega

Examples

1
2
3
4
5
6
7
 
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

Tlasso documentation built on Feb. 1, 2022, 9:07 a.m.