tenFM.sim: Generate Tensor Time series using given Factor Process and...

View source: R/tenFM.R

tenFM.simR Documentation

Generate Tensor Time series using given Factor Process and Factor Loading Matrices

Description

Simulate tensor time series X_t using a given factor process F_t. The factor process F_t can be generated by the function tenAR.sim.

Usage

tenFM.sim(Ft,dims=NULL,lambda=1,A=NULL,cov='iid',rho=0.2)

Arguments

Ft

input of the factor process, of dimension T \times r_1 \times r_2 \times \cdots \times r_k. It can be TenAR(p) tensor time series generated by the function tenAR.sim.

dims

dimensions of the output tensor at each time, d_1\times d_2\cdots\times d_K.

lambda

signal strength parameter of the tensor factor models, see Details section for more information.

A

a list of the factor loading matrices A_1, A_2, \cdots, A_K. The default is random orthogonal matrices A_k of dimension d_k \times r_k.

cov

covariance matrix of the error tensor: identity ("iid"), separable Kronecker structure ("separable"), random ("random").

rho

a parameter only for "separable" covariance matrix of the error tensor. It is the off-diagonal element of the error matrices, with the diagonal being 1.

Details

Simulate from the model :

X_t = \lambda F_t \times_{1} A_1 \times_{2} \cdots \times_{K} A_k + E_t,

where A_k is the deterministic loading matrix of size d_k \times r_k and r_k \ll d_k, the core tensor F_t itself is a latent tensor factor process of dimension r_1 \times \cdots \times r_K, \lambda is an additional signal strength parameter, and the idiosyncratic noise tensor E_t is uncorrelated (white) across time. In this function, by default A_k are orthogonal matrices.

Value

A tensor-valued time series of dimension T\times d_1\times d_2\cdots\times d_K.

See Also

tenAR.sim

Examples

set.seed(333)
dims <- c(16,18,20) # dimensions of tensor time series
r <- c(3,3,3)  # dimensions of factor series
Ft <- tenAR.sim(t=100, dim=r, R=1, P=1, rho=0.9, cov='iid')
lambda <- sqrt(prod(dims))
# generate t*dims tensor time series with iid error covaraince structure
x <- tenFM.sim(Ft,dims=dims,lambda=lambda,A=NULL,cov='iid')
# generate t*dims tensor time series with separable error covaraince structure
x <- tenFM.sim(Ft,dims=dims,lambda=lambda,A=NULL,cov='separable',rho=0.2)

tensorTS documentation built on May 29, 2024, 10:23 a.m.