DGP.CP: Generating simulated data for the example in Chang et al....

View source: R/CP_functions_unified.R

DGP.CPR Documentation

Generating simulated data for the example in Chang et al. (2024)

Description

DGP.CP() function generates simulated data following the data generating process described in Section 7.1 of Chang et al. (2024).

Usage

DGP.CP(n, p, q, d, d1, d2)

Arguments

n

Integer. The number of observations of the p \times q matrix time series {\bf Y}_t.

p

Integer. The number of rows of {\bf Y}_t.

q

Integer. The number of columns of {\bf Y}_t.

d

Integer. The number of columns of the factor loading matrices \bf A and \bf B.

d1

Integer. The rank of the p \times d matrix \bf A.

d2

Integer. The rank of the q \times d matrix \bf B.

Details

We generate

{\bf{Y}}_t = {\bf A \bf X}_t{\bf B}' + {\boldsymbol{\epsilon}}_t

for any t=1, \ldots, n, where {\bf X}_t = {\rm diag}({\bf x}_t) with {\bf x}_t = (x_{t,1},\ldots,x_{t,d})' being a d \times 1 time series, {\boldsymbol{\epsilon}}_t is a p \times q matrix white noise, and {\bf A} and {\bf B} are, respectively, p\times d and q \times d factor loading matrices. \bf A, {\bf X}_t, and \bf B are generated based on the data generating process described in Section 7.1 of Chang et al. (2024) and satisfy {\rm rank}({\bf A})=d_1 and {\rm rank}({\bf B})=d_2, 1 \le d_1, d_2 \le d.

Value

A list containing the following components:

Y

An n \times p \times q array.

A

The p \times d left loading matrix \bf A.

B

The q \times d right loading matrix \bf B.

X

An n \times d \times d array.

References

Chang, J., Du, Y., Huang, G., & Yao, Q. (2024). Identification and estimation for matrix time series CP-factor models. arXiv preprint. \Sexpr[results=rd]{tools:::Rd_expr_doi("doi:10.48550/arXiv.2410.05634")}.

See Also

CP_MTS.

Examples

p <- 10
q <- 10
n <- 400
d = d1 = d2 <- 3
data <- DGP.CP(n,p,q,d1,d2,d)
Y <- data$Y

## The first observation: Y_1
Y[1, , ]

HDTSA documentation built on April 3, 2025, 11:07 p.m.