ifa.em {ifa} | R Documentation |
ifa.em
is used to perform Independent Factor Analysis on a matrix of data by the Expectation Maximization algorithm.
ifa.em(y, ni, it = 15, eps = 0.001, init = NULL, scaling = TRUE)
y |
A data matrix with |
ni |
A vector containing the number of mixture components for modeling each factor. The number of factors is equal to the length of this vector. |
it |
The maximum number of iterations of the EM algorithm. By default it is set to 15. |
eps |
The lower bound for relative variation of the likelihood. It is used as alternative stopping rule for the EM algorithm: if the relative increment of the likelihood is lower than |
init |
A list containing initial values for the factor loading matrix (specified by |
scaling |
If TRUE (default) the data are scaled before fitting the IFA model |
Independent Factor Analysis is a latent variable model with
independent and non gaussian factors. The p
observed
variables x
are modelled in terms of a smaller set of k
unobserved independent latent variables, y
, and an additive
specific term u: x=Hy+u,
where u
is assumed
to be normally distributed with diagonal variance matrix Psi
and the factor loading
matrix H
is also
termed as mixing matrix
. The density of each
factor is modelled by a mixture of gaussians. The model is fitted by the EM algorithm.
This version can be computationally slow in the complex cases.
A faster R package for window which is based on fortran code can be downloaded at the home:
$www2.stat.unibo.it/viroli$ in the section Software and Data.
A list containing the components:
H |
The estimated factor loading matrix |
lik |
The log-likelihood computed at each iteration of the EM algorithm |
w |
A matrix with the estimated weights of the mixtures. Each row contains the weights of each factor |
mu |
A matrix with the estimated component means of the mixtures. Each row contains the vector means for each factor |
vu |
A matrix with the estimated component variances of the mixtures. Each row contains the vector variances for each factor |
psi |
The noise diagonal variance matrix |
ni |
The input vector specifying the number of components for each mixture |
L |
The number of factors |
numvar |
The number of observed variables |
numobs |
The number of observations |
Cinzia Viroli
Attias H. (1999), Independent Factor Analysis, Neural Computation, 11, 803–851.
Montanari A. and Viroli C. (2010), The Independent Factor Analysis approach to latent variable modeling, Statistics, 44, 397–416.
data(memory) init.values<-ifa.init.random(memory$x,2) fit<-ifa.em(memory$x,c(2,2),it=50,eps=0.0001,init.values) fit<-ifa.em(memory$x,c(2,2),it=50,eps=0.0001) plot(ifa.predict(scale(memory$x),fit))