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 (0,1), indicating the location of change point, i.e., (\tau T).

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 (0,1], indicating the magnitude of the break. When change=1, pp is the proportion of entries in R that changes; when change is not equal to 0 or 1, pp is the proportion of non-zero entries in the new factor loading.

a

a number in [0,min(p_1,p_2)), indicating the cross-sectional correlations of the idiosyncratic errors.

cc

a number in [0,1), indicating the AR(1) coefficient of the factor and error processes.

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))


[Package OLCPM version 0.1.2 Index]