POETKhat(Y)
Hallin,Liska,2007.Determining the number of factors in the general dynamic factor model.JASA 102,603-617.
Alessi,Barigozzi,Capasso,2010. Improved penalization for determining the number of factors in approximate factor models. Statistics and Probability Letters 80, 1806-1813.
p=100
n=100
Y<-array(rnorm(p*n),dim=c(p,n))
K<-POETKhat(Y)
Run the code above in your browser using DataLab