maximum likelihood estimation of factors
res = fac_ml(arg1,...,argn)
* arg1,...,argn = arguments which can be:
. a time series
. a real (n x p) vector
. a string equal to the name of a time series or a (n x p) real vector between quotes
. 'snum=xx' a vector [1, ,k] with the factors to keep
. 'LR=xx' with xx a exclusion matrix (OPTIONAL; Default: Lr=ones(k,r))
. 'LR=xx' with xx a exclusion matrix (OPTIONAL; Default: Lr=ones(k,r))
. 'LR=xx' with xx a exclusion matrix (OPTIONAL; Default: Lr=ones(k,r))
. the string 'noprint' if the user doesn't want to print the results of the regression
* res = a results tlist with:
- res('meth') = 'Maximum Likelihood Factor Analysis',
- res('x') = (nobs x nvar) matrix of variables
- res('nobs') = # of observations
- res('nvar') = # of variables
- res('nfactors') = # of estimated factors
- res('maxiter') = maximum # of iterations for the maximimisation of the log-likelihood
- res('tolerance') = tolerance (for Heywood cases)
- res('convcrit') = convergence criterion
- res('x means') = (nvar x 1) vector, collecting the means of the variables
- res('x stdev') = a (nvar x 1) vector, collecting the standard deviations of the variables
- res('loadings') = a (nvar x nfactors) matrix of loadings
- res('eigenvalues') = a(nvar x 1) vector of eigen values
- res('communalities') = a (nvar x 1) vecor, cllecting the part of each variable explained by the estiamted factors
- res('sigma') = a (nvar x nvar) matrix, the variance- covraiance matrix of residuals
- res('llike') = a vector, the estimated likelihood at each iteration until convergence
- res('scores') = a (nvar x nfactors) matrix of scores
- res('bayesian scores') = a (nvar x nfactors) matrix of bayesian scores
- res('factors') = a (nvar x nfactors) matrix of estimated factors
- res('bayesian factors') = a (nvar x nfactors) matrix of bayesian estimated factors
- res('resid') = a (nobs x nvar) matrix of residuals
- res('bayesian resid') = a (nobs x nvar) matrix of residualss
- res('Lr') = a (nvar x nfactors) matrix, with 0 on the cells that exclude a factor from the explanation of a variable
- res('aic') = a scalar, the AIC Information criterion
- res('bic') = a scalar, the BIC Information criterion . res('prests') = a boolean indicating the presence of ts in the variables
-res('namex') = the string vector of names of the input variables
- res('f1'),... , res('fn') = the selected factor from 1 to n = nfactors
- res('prests') = a boolean indicating the presence of ts in the variables
- res('namex') = the string vector of names of the input variables
- res('bounds') = the bounds of the estimation ((if there are ts in the regression))
global GROCERDIR; // load the Spanish yields data used by Enrique M. Quilis for his Faclib matlab toolbox. load(GROCERDIR+'\data\esp_yields.dat') // performs the factor estimation on these data with 3 factors, a maximum number of iterations equal to 100 and a convergence criterion equal to 1e-4 res = fac_ml(Z,'snum=3','maxiter=100','convcrit=1e-4'); | ![]() | ![]() |