powered by
This function determines the number of row factors under a two-way factor structure, using randomized test method.
KSTP( Y, alpha = 0.05, type = "proj", kmax = 4, epsilon = 0.05, r = 8, M = 100, S = 100, fq = 1/4 )
an integer for the number of row factors. To determine the number of column factors, just transpose the observation matrices.
data, a \(T\times p1\times p2\) array.
a number in (0,1), indicating the significance of the test.
indicates how to calculate the sample covariance. "flat" for the flat version, while others for the projected version.
a positive integer smaller than p2, indicating the upper bound for the factor numbers, and the dimension of projection matrix.
a small positive number in (0,1), indicating the size of scaling.
a positive number indicating the order of the power function for transforming the rescaled eigenvalue.
a large integer for the number of Gaussian variables in the randomized test.
another large integer for the number of replications in the strong rule. Usually \(M=S=T\).
a number in (0,0.5), controlling the threshold function of the strong rule.
See He et al. (2023)
He Y, Kong X, Trapani L, & Yu L (2023). One-way or two-way factor model for matrix sequences? Journal of Econometrics, 235(2), 1981-2004.
k1=3 k2=3 Sample_T=100 p1=40 p2=20 Y=gen.data(Sample_T,p1,p2,k1,k2,tau=0.5,change=0) KSTP(Y) KSTP(aperm(Y,c(1,3,2)))
Run the code above in your browser using DataLab