test.multiple.robust {OLCPM}R Documentation

robust test of multiple change point for matrix-valued online time series

Description

This function tests multiple change points for matrix-valued online time series, under a two-way factor structure. A change point will be reported only when it's the majority vote in multiple replications. The function KSTP is used to determine the initial number of factors in each regime. This function only outputs the change points for row factors. For column factors, transpose the data.

Usage

test.multiple.robust(
  Y,
  k = 1,
  m = 20,
  epsilon1 = 0.25,
  epsilon2 = 0.05,
  r = 8,
  kmax = 4,
  type = "proj",
  method = "ps",
  eta = 0.25,
  cv = 2.386,
  S = 100,
  pr = 0.75
)

Arguments

Y

data, a T\times p1\times p2 array.

k

a non-negative integer indicating the initial number of factors.

m

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

epsilon1

the rescaling parameter taking value in (0,1), for the test of new factors or the change of loading space; see He et al. (2021).

epsilon2

the rescaling parameter taking value in (0,1), for the test of vanishing factors; see He et al. (2021).

r

a positive integer indicating the order of the transformation function g(x)=|x|^r; see also gen.psi.tau.proj.

kmax

a positive number determining the column number of the projection matrix, should be larger than 0 but smaller than p_2, required when type not being "flat".

type

indicates how to calculate the sample covariance. "flat" for the flat version, while others for the projected version. See more details in He et al. (2021).

method

indicating the test statistic, “ps” for the partial-sum method; others for the worst-case method.

eta

a number between [0,1), indicating the parameter \eta used in the partial-sum statistic.

cv

critical value; see also test.once.psi.

S

an integer indicating the number of replications.

pr

an number in (0,1]). The procedure reports a change point only when the proportion of positive votes is over pr in the S replications.

Details

#' See empirical study in He et al. (2021).

Value

a matrix with two columns. The first column reports the locations of change points. The second column reports the number of row factors after each change point.

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


k1=3
k2=3
Sample_T=100
p1=40
p2=40
kmax=8
r=8
m=p2

# generate data
Y1=gen.data(Sample_T,p1,p2,k1,k2,tau=0.5,change=1,pp=0.5)
Y2=gen.data(Sample_T,p1,p2,k1,k2,tau=0.5,change=0)
Y=array(rbind(matrix(Y1,Sample_T,p1*p2),matrix(Y2,Sample_T,p1*p2)),c(Sample_T*2,p1,p2))

# calculate cv for "ps" with eta=0.45 and "wc"
cv1=getcv(0.05,method="ps",eta=0.45)
cv2=getcv(0.05,method="wc")

# test with Y
test.multiple.robust(Y,k1,m,epsilon1=0.25,epsilon2=0.05,r,type="proj",kmax,method="ps")

test.multiple.robust(Y,k1,m,epsilon1=0.25,epsilon2=0.05,r,type="proj",kmax,method="wc",cv=cv2)

test.multiple.robust(Y,k1,m,epsilon1=0.25,epsilon2=0.05,r,type="flat",method="wc",cv=cv2)

test.multiple.robust(Y,k1,m,epsilon1=0.25,epsilon2=0.05,r,type="flat",method="ps",eta=0.45,cv=cv1)


[Package OLCPM version 0.1.1 Index]