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 n rows representing observations and p columns representing variables. |
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 eps the fitting is stopped. The default is 0.001. |
init |
A list containing initial values for the factor loading matrix (specified by H ) and the variance matrix of the noise term (specified by psi ). If NULL (default) the algorithm starts from the ordinal factor model solution. |
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 backslash 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 |
scaling |
A logical value indicating if the data have been scaled before fitting the IFA model |
se |
A list containing the asymptotic standard errors for the parameter estimates |
Cinzia Viroli
Attias H. (1999), Independent Factor Analysis, Neural Computation, 11, 803–851.
Montanari A., Cal'{o}, D.G., Viroli C. (2005), Independent Factor Discriminant Analysis, Prooceedings of Applied Stochastic Models and Data Analysis, Brest, France, 569-576. Available at $www2.stat.unibo.it backslash viroli$.
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(memory$x,fit))