R: Factor Analysis model adjustment with the EM algorithm
emfa
R 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
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(FAMT)
Loading required package: mnormt
Loading required package: impute
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/FAMT/emfa.Rd_%03d_medium.png", width=480, height=480)
> ### Name: emfa
> ### Title: Factor Analysis model adjustment with the EM algorithm
> ### Aliases: emfa
>
> ### ** Examples
>
> ## Reading 'FAMTdata'
> data(expression)
> data(covariates)
> data(annotations)
> chicken = as.FAMTdata(expression,covariates,annotations,idcovar=2)
$`Rows with missing values`
integer(0)
$`Columns with missing values`
integer(0)
>
> # EM fitting of the Factor Analysis model
> chicken.emfa = emfa(chicken,nbf=3,x=c(3,6),test=6)
[1] "Fitting Factor Analysis Model with 3 factors"
> chicken.emfa$commonvar
[1] 0.3919842
>
>
>
>
>
> dev.off()
null device
1
>