# emfa: Factor Analysis model adjustment with the EM algorithm In FAMT: Factor Analysis for Multiple Testing (FAMT) : simultaneous tests under dependence in high-dimensional data

## Description

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

## Usage

 `1` ```emfa(data, nbf, x = 1, test = x, 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 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

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

`as.FAMTdata`, `nbfactors`
 ```1 2 3 4 5 6 7 8 9``` ```## 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 ```