ifa.em: Fitting an Independent Factor Analysis model by the EM...

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

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

Usage

1
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. 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.

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

Author(s)

Cinzia Viroli

References

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.

See Also

ifa.init.random, ifa.init.pca

Examples

1
2
3
4
5
6
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))

Example output



ifa documentation built on May 2, 2019, 1:07 p.m.

Related to ifa.em in ifa...