PCA_FN | R Documentation |
This function is to estimate factor numbers via eigenvalue ratios corresponding to Principal Component Analysis (PCA).
PCA_FN(X, rmax)
X |
Input matrix, of dimension |
rmax |
The user-supplied maximum factor numbers. |
See Ahn and Horenstein (2013) for details.
rhat |
The estimated factor numbers. |
Yong He, Lingxiao Li, Dong Liu, Wenxin Zhou.
Ahn, S.C., Horenstein, A.R., 2013. Eigenvalue ratio test for the number of factors. Econometrica 81, 1203–1227.
set.seed(1)
T=50;N=50;r=3
L=matrix(rnorm(N*r,0,1),N,r);F=matrix(rnorm(T*r,0,1),T,r)
E=matrix(rnorm(T*N,0,1),T,N)
X=F%*%t(L)+E
PCA_FN(X,8)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.