ifa.em {ifa}R Documentation

Fitting an Independent Factor Analysis model by the EM algorithm

Description

ifa.em is used to perform Independent Factor Analysis on a matrix of data by the Expectation Maximization algorithm.

Usage

ifa.em(y, ni, it = 15, eps = 0.001, init = NULL, scaling = TRUE)

Arguments

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

Details

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. The algorithm can be computationally slow in the complex cases.

Value

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 variable indicating if data have been scaled before performing the EM algorithm
std.err A list containing standard errors of the EM estimates
init A list containing the initial values (if specified) of the EM algorithm

Author(s)

Cinzia Viroli

References

Attias H. (1999), Independent Factor Analysis, Neural Computation, 11, 803–851.

Montanari A., Calo', 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/viroli.

See Also

ifa.init.random, ifa.init.pca

Examples

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))

[Package ifa version 5.0 Index]