nbfactors | R Documentation |
The optimal number of factors of the FA model is estimated to minimize the variance of the number of false positives (see Friguet et al., 2009).
nbfactors(data, x = 1, test = x[1], pvalues = NULL, maxnbfactors = 8, diagnostic.plot = FALSE, min.err = 0.001)
data |
'FAMTdata' object, see |
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 |
Vector of p-values for the individual tests. If NULL, the classical procedure is applied (see |
maxnbfactors |
The maximum number of factors for the FA model (8 by default) |
diagnostic.plot |
boolean (FALSE by default). If TRUE, the values of the variance inflation criteria for each number of factors are plotted |
min.err |
Stopping criterion value for iterations (default value : 0.001) |
optimalnbfactors |
Optimal number of factors of the FA model (an elbow criterion is used) |
criterion |
Variance criterion for each number of factors |
David Causeur
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
, emfa
## Reading 'FAMTdata' data(expression) data(covariates) data(annotations) chicken = as.FAMTdata(expression,covariates,annotations,idcovar=2) # Estimation of the number of factors ## Not run: nbfactors(chicken,x=c(3,6),test=6) # Estimation of the number of factors with a graph of variance inflation # criterion ## Not run: nbfactors(chicken,x=c(3,6),test=6, diagnostic.plot=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.