M2.mle | R Documentation |
Estimating the latent factors and factor loadings in high dimensional factor model using maximum likelihood methods based on the covariance or correlation matrix.
M2.mle(
X,
r,
scale = F,
method = c("ML", "QML", "ML-GLS", "ML-ITE", "ML-EM"),
eps = 10^-6,
ar.order = 1,
...
)
X |
A matrix or data frame with t rows (samples) and n columns (variables). |
r |
The number of factors. |
scale |
logical. If |
method |
Method to use: " |
eps |
The iteration error, default to 10^-8. Available for Maximum Likelihood methods. |
ar.order |
An integer. Auto regression lag for the idiosyncratic errors in |
... |
Any other parameters. |
A list of factors, factor loadings and other information, see below.
f
Estimated factors.
u
Estimated factor loadings.
e
Estimated errors.
m2e
Diagonal elements of the covariance matrix of errors, only provided in PCA
and ML
.
rho
Auto regression coefficients of errors, only provided in ML-GLS
, ML-ITE
and ML-EM
.
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.mle(data,r = 2,method = "ML-EM")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.