M2.gmm | R Documentation |
Estimating the latent factors and factor loadings in high dimensional factor model using generalized moment methods based on the covariance matrix.
M2.gmm(
X,
r,
kappa = 0,
sigma_e = NULL,
initial = c("PCA", "MLE"),
W_diag = FALSE,
identity = FALSE,
delta = NULL,
eps = 10^-6,
...
)
X |
A matrix or data frame with t rows (samples) and n columns (variables). |
r |
The number of factors. |
kappa |
An integer. The weight between |
sigma_e |
A |
initial |
The method used to initialize the factor loadings and the variance of errors. |
W_diag |
Logical. If |
identity |
Logical. If |
delta |
An integer. The hard threshold value of |
eps |
The iteration error, default to 10^-6. Available for initializing the estimators by Maximum Likelihood method. |
... |
Any other parameters. |
A list of factors, factor loadings and other information, see below.
f
Estimated factors.
u
Estimated factor loadings.
e
Estimated errors.
ev
Eigenvalues of covariance matrix.
n = 100
t = 200
k = 2
par_f = list(rep(1,k),rep(0.8,k),rep(1,k),rep(Inf,k))
par_e = list(1,0,2,Inf)
rho_f = c(0.5,0.2)
par_cove = list(beta = 0.2,J = n/10,rho = 0.2,msig_e = c(1,5))
data = hofa.DGP2(n,t,k,par_f,par_e,par_cove,rho_f)$X
M2.gmm(data,r = 2,kappa = 0,sigma_e = rep(1,n),initial = "PCA")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.