Learn R Programming

HDRFA (version 0.1.5)

PCA_FN: Estimating Factor Numbers via Eigenvalue Ratios Corresponding to PCA

Description

This function is to estimate factor numbers via eigenvalue ratios corresponding to Principal Component Analysis (PCA).

Usage

PCA_FN(X, rmax)

Value

rhat

The estimated factor numbers.

Arguments

X

Input matrix, of dimension \(T\times N\). Each row is an observation with \(N\) features at time point \(t\).

rmax

The user-supplied maximum factor numbers.

Author

Yong He, Lingxiao Li, Dong Liu, Wenxin Zhou.

Details

See Ahn and Horenstein (2013) for details.

References

Ahn, S.C., Horenstein, A.R., 2013. Eigenvalue ratio test for the number of factors. Econometrica 81, 1203–1227.

Examples

Run this code
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)

Run the code above in your browser using DataLab