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)n rows representing observations and p columns representing variables.eps the fitting is stopped. The default is 0.001.H) and the variance matrix of the noise term (specified by psi). If NULL (default) the algorithm starts from the ordinal factor model solution.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.Montanari A. and Viroli C. (2010), The Independent Factor Analysis approach to latent variable modeling, Statistics, 44, 397--416.
ifa.init.random, ifa.init.pcadata(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))
Run the code above in your browser using DataLab