FA(dta, test=NULL, nbf=NULL, maxnbfactors=12, nfolds=10,grouped=FALSE,
plot.diagnostic=FALSE, min.err = 0.001, verbose=TRUE)
x
is the n x p matrix of explanatory variables, where n stands for the training sample size and
p for the number of explanatory variables ; y
is a numeric vectnbf = NULL
, the number of factors is estimated. nbf
can
also be set to a positive integer value. If nbf = 0
, the data are not factor-adjusted.maxnbfactors=12
.nfolds=10
. The smallest value is nfolds = 3
. To perform
Leave-One-Out cross-validatiodiagnostic.plot=TRUE
, the values of the variance inflation criterion are
plotted for each number of factors. Default is diagnostic.plot=FALSE
. This option might be helpful
to manually determine the optimal number of factors.TRUE
.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, 1406-1415.
Perthame, E., Friguet, C. and Causeur, D. (2014), Stability of feature selection in classification issues for high-dimensional correlated data, Submitted.
FADA-package
FADA
glmnet-package
data(data.train)
data(data.test)
res = FA(data.train,data.test) # when the optimal number of factors is unknown
### Not run
# res0 = FA(data.train,data.test,nbf=2) # when the number of factors is forced
Run the code above in your browser using DataLab