IQR | R Documentation |
This function is to fit the quantile factor model via the Iterative Quantile Regression (IQR) algorithm.
IQR(X, r, tau, L_init = NULL, F_init = NULL, max_iter = 100, eps = 0.001)
X |
Input matrix, of dimension |
r |
A positive integer indicating the factor numbers. |
tau |
The user-supplied quantile level. |
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. |
max_iter |
The maximum number of iterations. The default is |
eps |
The stopping critetion parameter. The default is 1e-06. |
See Chen et al. (2021) and He et al. (2023) for details.
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 |
t |
The number of iterations. |
Yong He, Lingxiao Li, Dong Liu, Wenxin Zhou.
Chen, L., Dolado, J.J., Gonzalo, J., 2021. Quantile factor models. Econometrica 89, 875–910.
He Y, Kong X, Yu L, Zhao P., 2023 Quantile factor analysis for large-dimensional time series with statistical guarantee <arXiv:2006.08214>.
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
tau=0.5
fit=IQR(X,r,tau)
fit$Fhat;fit$Lhat
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.