AMFA {autoMFA}R Documentation

Automated Mixtures of Factor Analyzers

Description

An implementation of AMFA algorithm from (Wang and Lin 2020). The number of factors, q, is estimated during the fitting process of each MFA model. The best value of g is chosen as the model with the minimum BIC of all candidate models in the range gmin <= g <= gmax.

Usage

AMFA(
  Y,
  gmin = 1,
  gmax = 10,
  eta = 0.005,
  itmax = 500,
  nkmeans = 5,
  nrandom = 5,
  tol = 1e-05,
  conv_measure = "diff",
  varimax = FALSE
)

Arguments

Y

An n by p data matrix, where n is the number of observations and p is the number of dimensions of the data.

gmin

The smallest number of components for which an MFA model will be fitted.

gmax

The largest number of components for which an MFA model will be fitted.

eta

The smallest possible entry in any of the error matrices D_i (Zhao and Yu 2008).

itmax

The maximum number of ECM iterations allowed for the estimation of each MFA model.

nkmeans

The number of times the k-means algorithm will be used to initialise models for each combination of g and q.

nrandom

The number of randomly initialised models that will be used for each combination of g and q.

tol

The ECM algorithm terminates if the measure of convergence falls below this value.

conv_measure

The convergence criterion of the ECM algorithm. The default 'diff' stops the ECM iterations if |l^(k+1) - l^(k)| < tol where l^(k) is the log-likelihood at the kth ECM iteration. If 'ratio', then the convergence of the ECM iterations is measured using |(l^(k+1) - l^(k))/l^(k+1)|.

varimax

Boolean indicating whether the output factor loading matrices should be constrained using varimax rotation or not.

Value

A list containing the following elements:

References

Wang W, Lin T (2020). “Automated learning of mixtures of factor analysis models with missing information.” TEST. ISSN 1133-0686.

Zhao J, Yu PLH (2008). “Fast ML Estimation for the Mixture of Factor Analyzers via an ECM Algorithm.” IEEE Transactions on Neural Networks, 19(11), 1956-1961. ISSN 1045-9227.

Examples

RNGversion('4.0.3'); set.seed(3)
MFA.fit <- AMFA(autoMFA::MFA_testdata,3,3, nkmeans = 3, nrandom = 3, itmax = 100)

[Package autoMFA version 1.0.0 Index]