HPCA {HDRFA} | R Documentation |
Huber Principal Component Analysis for Large-Dimensional Factor Models
Description
This function is to fit the factor models via the Huber Principal Component Analysis (HPCA) method. One is based on minimizing the Huber loss of the idiosyncratic error's \ell_2
norm, which turns out to do Principal Component Analysis (PCA) on the weighted sample covariance matrix and thereby named as Huber PCA. The other one is based on minimizing the elementwise Huber loss, which can be solved by an iterative Huber regression algorithm.
Usage
HPCA(X, r, Method = "E", tau = NULL, scale_est="MAD", L_init = NULL,
F_init = NULL, maxiter_HPCA = 100, maxiter_HLM = 100, eps = 0.001)
Arguments
X |
Input matrix, of dimension |
r |
A positive integer indicating the factor numbers. |
Method |
|
tau |
Optional user-supplied parameter for Huber loss; default is NULL, and |
scale_est |
A parameter for the elementwise Huber loss. |
L_init |
User-supplied inital value of loadings; default is the PCA estimator. |
F_init |
User-supplied inital value of factors; default is the PCA estimator. |
maxiter_HPCA |
The maximum number of iterations in the HPCA. The default is |
maxiter_HLM |
The maximum number of iterations in the iterative Huber regression algorithm. The default is |
eps |
The stopping critetion parameter in the HPCA. The default is 1e-3. |
Details
See He et al. (2023) for details.
Value
The return value is a list. In this list, it contains the following:
Fhat |
The estimated factor matrix of dimension |
Lhat |
The estimated loading matrix of dimension |
m |
The number of iterations. |
Author(s)
Yong He, Lingxiao Li, Dong Liu, Wenxin Zhou.
References
He Y, Li L, Liu D, Zhou W., 2023 Huber Principal Component Analysis for Large-dimensional Factor Models.
Examples
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
fit=HPCA(X,r,Method = "E")
fit$Fhat;fit$Lhat
fit=HPCA(X,r,Method = "P")
fit$Fhat;fit$Lhat