| gen.data {OLCPM} | R Documentation | 
generate data
Description
This function generates matrix-valued time series under a two-way factor structure with/without a change point.
Usage
gen.data(
  Sample_T,
  p1,
  p2,
  k1,
  k2,
  tau = 0.5,
  change = 0,
  pp = 0.3,
  a = 0,
  cc = 0
)
Arguments
| Sample_T | positive integer indicating the length of series. | 
| p1 | positive integer indicating the row dimension. | 
| p2 | positive integer indicating the column dimension. | 
| k1 | positive integer indicating the number of row factors. | 
| k2 | positive integer indicating the number of column factors. | 
| tau | a real number in  | 
| change | the type of change, taking 0 for no change point, taking 1 for the case that the loading matrix R changes, taking other values for the case that a new row factor occurs. | 
| pp | a number in  | 
| a | a number in  | 
| cc | a number in  | 
Details
See the paper He et al. (2021).
Value
a T\times p1 \times p2 array.
Author(s)
Yong He, Xinbing Kong, Lorenzo Trapani, Long Yu
References
He Y, Kong X, Trapani L, & Yu L(2021). Online change-point detection for matrix-valued time series with latent two-way factor structure. arXiv preprint, arXiv:2112.13479.
Examples
# set parameters
k1=3
k2=3
epsilon=0.05
Sample_T=50
p1=40
p2=20
# generate data
Y=gen.data(Sample_T,p1,p2,k1,k2,tau=0.5,change=1,pp=0.3)
print("the dimension of Y is:")
print(dim(Y))