MFA_ECM: ECM-Based MFA Estimation

Description Usage Arguments Value References Examples

View source: R/ECM.fit.R

Description

An implementation of an ECM algorithm for the MFA model which does not condition on the factors being known \insertCiteJian-HuaZhao2008FMEfautoMFA. Performs a grid search from gmin to gmax, and qmin to qmax, respectively. The best combination of g and q is chosen to be the model with the minimum BIC.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
MFA_ECM(
  Y,
  gmin = 1,
  gmax = 10,
  qmin = 1,
  qmax = NULL,
  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.

qmin

The smallest number of factors with which an MFA model will be fitted.

qmax

The largest number of factors with which an MFA model will be fitted. Must obey the Ledermann bound.

eta

The smallest possible entry in any of the error matrices D_i \insertCiteJian-HuaZhao2008FMEfautoMFA.

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

\insertRef

Jian-HuaZhao2008FMEfautoMFA

Examples

1
2
RNGversion('4.0.3'); set.seed(3)
MFA.fit <- MFA_ECM(autoMFA::MFA_testdata,3,3)

autoMFA documentation built on Aug. 10, 2021, 5:07 p.m.