Title: | Robust Exponential Factor Analysis |
---|---|
Description: | A robust alternative to the traditional principal component estimator is proposed within the framework of factor models, known as Robust Exponential Factor Analysis, specifically designed for the modeling of high-dimensional datasets with heavy-tailed distributions. The algorithm estimates the latent factors and the loading by minimizing the exponential squared loss function. To determine the appropriate number of factors, we propose a modified rank minimization technique, which has been shown to significantly enhance finite-sample performance. |
Authors: | Jiaqi Hu [cre, aut], Xueqin Wang [aut] |
Maintainer: | Jiaqi Hu <[email protected]> |
License: | GPL-3 |
Version: | 0.1.0 |
Built: | 2025-02-12 05:40:55 UTC |
Source: | https://github.com/cran/REFA |
Estimation of errors for common component
ECC(Chat, C)
ECC(Chat, C)
Chat |
The estimated common component |
C |
The true common component |
a numeric value of the ECC
Jiaqi Hu
Manuscript: Robust factor analysis with exponential squared loss
dat = gendata() Y = dat$Y F0 = dat$F0 L0 = dat$L0 C0 = F0 res = REFA(dat$Y, r = 3) Fhat = res$Fhat Lhat = res$Lhat Chat = Fhat ECC(Chat, C0)
dat = gendata() Y = dat$Y F0 = dat$F0 L0 = dat$L0 C0 = F0 res = REFA(dat$Y, r = 3) Fhat = res$Fhat Lhat = res$Lhat Chat = Fhat ECC(Chat, C0)
Estimating Factor Numbers Corresponding PCA
est_num(X, kmax = 8, type = "BIC3")
est_num(X, kmax = 8, type = "BIC3")
X |
Input matrix, of dimension |
kmax |
The user-supplied maximum factor numbers. |
type |
the method used. |
the estimated factor numbers
Jiaqi Hu
Manuscript: Robust factor analysis with exponential squared loss
dat = gendata() est_num(dat$Y)
dat = gendata() est_num(dat$Y)
Principal Component Analysis for Factor Models
FA(X, r)
FA(X, r)
X |
Input matrix, of dimension |
r |
A positive integer indicating the factor numbers. |
Fhat |
The estimated factor matrix. |
Lhat |
The estimated loading matrix. |
Jiaqi Hu
Manuscript: Robust factor analysis with exponential squared loss
##---- Should be DIRECTLY executable !! ----
##---- Should be DIRECTLY executable !! ----
Generate heavy-tailed data.
gendata(seed = 1, T = 50, N = 50, type = "1a")
gendata(seed = 1, T = 50, N = 50, type = "1a")
seed |
the |
T |
time dimension. |
N |
cross-sectional dimension. |
type |
the type of the data generation process, it can be |
a list consisting of Y, F0, L0
.
Jiaqi Hu
Manuscript: Robust factor analysis with exponential squared loss
dat = gendata() Y = dat$Y head(Y)
dat = gendata() Y = dat$Y head(Y)
Robust Exponential Factor Analysis
REFA(Y, r = 3, tau = 0.75, q = 0.05, eps = 1e-05, init = TRUE)
REFA(Y, r = 3, tau = 0.75, q = 0.05, eps = 1e-05, init = TRUE)
Y |
Input matrix, of dimension |
r |
A positive integer indicating the factor numbers. |
q |
Hyper parameter |
eps |
The stopping criterion parameter. The default is 1e-5. |
tau |
Hyper parameter |
init |
Warn start of the algorithm. If |
Fhat |
The estimated factor matrix. |
Lhat |
The estimated loading matrix. |
loss |
the value of the loss function. |
Jiaqi Hu
Manuscript: Robust factor analysis with exponential squared loss
dat = gendata() REFA(dat$Y, r = 3)
dat = gendata() REFA(dat$Y, r = 3)
Estimating Factor Numbers via Modified Rank Minimization
REFA_FN(Y, rmax = 8, tau = 0.75, q = 0.1, eps = 1e-04, init = TRUE)
REFA_FN(Y, rmax = 8, tau = 0.75, q = 0.1, eps = 1e-04, init = TRUE)
Y |
Input matrix, of dimension |
rmax |
The bound of the number of factors. |
q |
Hyper parameter in modified PCA algorithm. Default is |
eps |
The stopping criterion parameter. Default is |
tau |
Hyper parameter in selecting |
init |
Warn start by modified PCA algorithm. Default is |
rhat |
The estimated factor number. |
Fhat |
The estimated factor matrix. |
Lhat |
The estimated loading matrix. |
loss |
the value of the loss function. |
Jiaqi Hu
Manuscript: Robust factor analysis with exponential squared loss
dat = gendata() REFA_FN(dat$Y, rmax = 8)
dat = gendata() REFA_FN(dat$Y, rmax = 8)
Trace ratios
TR(Fhat, F0)
TR(Fhat, F0)
Fhat |
The estimated factors. |
F0 |
The true factors. |
a numeric value of the trace ratios.
Jiaqi Hu
Manuscript: Robust factor analysis with exponential squared loss
dat = gendata() Y = dat$Y F0 = dat$F0 res = REFA(dat$Y, r = 3) Fhat = res$Fhat TR(Fhat, F0)
dat = gendata() Y = dat$Y F0 = dat$F0 res = REFA(dat$Y, r = 3) Fhat = res$Fhat TR(Fhat, F0)