tenFM.sim | R Documentation |
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
.
tenFM.sim(Ft,dims=NULL,lambda=1,A=NULL,cov='iid',rho=0.2)
Ft |
input of the factor process, of dimension |
dims |
dimensions of the output tensor at each time, |
lambda |
signal strength parameter of the tensor factor models, see Details section for more information. |
A |
a list of the factor loading matrices |
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. |
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.
A tensor-valued time series of dimension T\times d_1\times d_2\cdots\times d_K
.
tenAR.sim
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.