# HPCA_FN: Estimating Factor Numbers via Rank Minimization Corresponding... In HDRFA: High-Dimensional Robust Factor Analysis

 HPCA_FN R Documentation

## Estimating Factor Numbers via Rank Minimization Corresponding to Huber PCA

### Description

This function is to estimate factor numbers via rank minimization corresponding to Huber Principal Component Analysis (HPCA).

### Usage

HPCA_FN(X, rmax, Method = "E", threshold = NULL, L_init = NULL, F_init = NULL,
maxiter_HPCA = 100, maxiter_HLM = 100, eps = 0.001)


### 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. Method Method="P" indicates minimizing the Huber loss of the idiosyncratic error's \ell_2 norm while Method="E" indicates minimizing the elementwise Huber loss. The default is the elementwise Huber loss. threshold The threshold of rank minimization; default is NULL. L_init User-supplied inital value of loadings in the HPCA; default is the PCA estimator. F_init User-supplied inital value of factors in the HPCA; default is the PCA estimator. maxiter_HPCA The maximum number of iterations in the HPCA. The default is 100. maxiter_HLM The maximum number of iterations in the iterative Huber regression algorithm. The default is 100. eps The stopping critetion parameter in the HPCA. The default is 1e-3.

### Details

See He et al. (2023) for details.

### Value

 rhat The estimated factor number.

### 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

HPCA_FN(X,8,Method="E")

HPCA_FN(X,8,Method="P")


HDRFA documentation built on Nov. 7, 2023, 5:06 p.m.