estim_ncpMultilevel | R Documentation |
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)
X |
a data.frame with categorical variables; with missing entries or not |
ifac |
index of the group variable |
ncpB.min |
integer corresponding to the minimum number of components to test for the between matrix |
ncpB.max |
integer corresponding to the maximum number of components to test for the between matrix |
ncpW.min |
integer corresponding to the minimum number of components to test for the within matrix |
ncpW.max |
integer corresponding to the maximum number of components to test for the within matrix |
scale |
if all the variables are continuous, should they be standardized? Yes if true. |
nbsim |
number of simulations |
pNA |
percentage of missing values added in the data set, useful only if method.cv="Kfold" |
threshold |
the threshold for assessing convergence |
nb.cores |
Integer, number of core used. By default, NULL and the number of cores used are the number of cores of your computer minus 1 |
verbose |
boolean. TRUE means that a progressbar is writtent |
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.
ncp |
the number of components retained for the FAMD |
criterion |
the criterion (the MSEP) calculated for each number of components |
imputeMultilevel
## Not run:
data(ozone)
result <- estim_ncpMultilevel(ozone, ifac=12)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.