Estimate the number of dimensions for Multilevel principal component (multilevel PCA, multilevel MCA ormultilevel Factorial Analysis of Mixed Data) by cross-validation
estim_ncpMultilevel(X, ifac=1, ncpW.min = 1, ncpW.max = 5, ncpB.min = 1,
ncpB.max = 5, scale = TRUE, nbsim=100, pNA=0.05, threshold=1e-4,
nb.cores = NULL, verbose = TRUE)
a data.frame with categorical variables; with missing entries or not
index of the group variable
integer corresponding to the minimum number of components to test for the between matrix
integer corresponding to the maximum number of components to test for the between matrix
integer corresponding to the minimum number of components to test for the within matrix
integer corresponding to the maximum number of components to test for the within matrix
if all the variables are continuous, should they be standardized? Yes if true.
number of simulations
percentage of missing values added in the data set, useful only if method.cv="Kfold"
the threshold for assessing convergence
Integer, number of core used. By default, NULL and the number of cores used are the number of cores of your computer minus 1
boolean. TRUE means that a progressbar is writtent
the number of components retained for the FAMD
the criterion (the MSEP) calculated for each number of components
pNA percentage of missing values is inserted at random in the data matrix and predicted with a multilevel model using ncpB.min to ncpB.max and ncpW.min to ncpW.max dimensions. This process is repeated nbsim times. The number of components which leads to the smallest MSEP is retained. More precisely, the missing entries are predicted using the imputeMultilevel function.
# NOT RUN {
data(ozone)
result <- estim_ncpMultilevel(ozone, ifac=12)
# }
Run the code above in your browser using DataLab