Learn R Programming

OLCPM (version 0.1.1)

gen.psi.tau.proj: calculate eigenvalue series by projected method

Description

This function calculates the rolling eigenvalue series for the monitoring process, based on the projected version of sample covanriance matrix.

Usage

gen.psi.tau.proj(Y, k, m, delta, r, kmax)

Value

a \((T-m)\times 3\) matrix, whose three columns are the original, rescaled, and transformed eigenvalue series, respectively.

Arguments

Y

the observed \(T\times p1\times p2\) array. \(T\) is the sample size, \(p1\) and \(p2\) are the row and column dimensions, respectively.

k

a positive integer determining which eigenvalue to monitor. \(k=1\) for the largest eigenvalue.

m

a positive integer (\(>1\)) indicating the bandwidth of the rolling windom.

delta

a number in \((0,1)\) indicating the rescaling parameter for the eigenvalue. The default approach to calcualte delta is in the paper He et al. (2021).

r

a positive integer indicating the order of the transformation function \(g(x)=|x|^r\). Motivated by the paper, \(r\) should be chosen according to the moments of the data; see more details in He et al. (2021).

kmax

a positive integer indicating the column number of the projection matrix, should be larger than 0 but smaller than \(p2\).

Author

Yong He, Xinbing Kong, Lorenzo Trapani, Long Yu

Details

The rolling eigenvalue series will start at the stage \(m+1\), with length \(T-m\).

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

Run this code

## generate data
k1=3
k2=3
epsilon=0.05
Sample_T=50
p1=40
p2=20
kmax=8
r=8
m=p2

# generate data
Y=gen.data(Sample_T,p1,p2,k1,k2,tau=0.5,change=1,pp=0.3)

# calculate delta
temp=log(p1)/log(m*p2)
delta=epsilon*(temp<=0.5)+(epsilon+1-1/(2*temp))*(temp>0.5)

# calculate psi.tau
psi2=gen.psi.tau.proj(Y,k1+1,m,delta,r,kmax)
print(psi2)

Run the code above in your browser using DataLab