gen.psi.tau.proj | R Documentation |
This function calculates the rolling eigenvalue series for the monitoring process, based on the projected version of sample covanriance matrix.
gen.psi.tau.proj(
Y,
k,
m = ceiling(max(20, (dim(Y)[3])^(r/(r + 2)))),
delta,
r = 8,
kmax = 3
)
Y |
the observed |
k |
a positive integer determining which eigenvalue to monitor.
|
m |
a positive integer ( |
delta |
a number in |
r |
a positive integer indicating the order of the transformation
function |
kmax |
a positive integer indicating the column number of the
projection matrix, should be larger than 0 but smaller than |
The rolling eigenvalue series will start at the stage m+1
, with length
T-m
.
a (T-m)\times 3
matrix, whose three columns are the original,
rescaled, and transformed eigenvalue series, respectively.
Yong He, Xinbing Kong, Lorenzo Trapani, Long Yu
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.
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.