emfa: Factor Analysis model adjustment with the EM algorithm

View source: R/emfa.R

emfaR Documentation

Factor Analysis model adjustment with the EM algorithm

Description

A function to fit a Factor Analysis model with the EM algorithm.

Usage

emfa(data, nbf, x = 1, test = x[1], pvalues = NULL, min.err = 0.001)

Arguments

data

'FAMTdata' object, see as.FAMTdata

nbf

Number of factors of the FA model, see nbfactors

x

Column number(s) corresponding to the experimental condition and the optional covariates (1 by default) in the covariates data frame.

test

Column number corresponding to the experimental condition (x[1] by default) on which the test is performed.

pvalues

p-values of the individual tests. If NULL, the classical procedure is applied (see raw.pvalues)

min.err

Stopping criterion value for iterations in EM algorithm (default value: 0.001)

Details

In order to use this function, the number of factors is needed (otherwise, use nbfactors).

Value

B

Estimation of the loadings

Psi

Estimation of Psi

Factors

Scores of the individuals on the factors

commonvar

Proportion of genes common variance (modeled on the factors)

SelectHo

Vector of row numbers corresponding to the non-significant genes

Author(s)

David Causeur

References

Friguet C., Kloareg M. and Causeur D. (2009). A factor model approach to multiple testing under dependence. Journal of the American Statistical Association, 104:488, p.1406-1415

See Also

as.FAMTdata, nbfactors

Examples

## Reading 'FAMTdata'
data(expression)
data(covariates)
data(annotations)
chicken = as.FAMTdata(expression,covariates,annotations,idcovar=2)

# EM fitting of the Factor Analysis model
chicken.emfa = emfa(chicken,nbf=3,x=c(3,6),test=6)
chicken.emfa$commonvar

FAMT documentation built on May 9, 2022, 5:07 p.m.