Description Usage Arguments Value Examples
uses the results from the multiple factor analysis to reweigh all data based on sample results
1 | mfa_data_reweight(dataset, mfa_res, index, dim, plot = T)
|
dataset |
the dataset that needs to be reweighted |
mfa_res |
a MFA object that contains the dimension reduction results |
index |
if index is provided it will be binded to dataframe in the end |
dim |
number of dimensions to keep |
plot_scree |
plots the eigenvalues against the factors for interpretation |
MFA Object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | load_toolbox()
data(sales)
dataset <- sales
dataset[,1] <- factor(dataset[,1])
# Samle data and run MFA on the sample
sample <- sample_n(v, 1000)
load_pkg("FactoMineR")
mfa_res <- parMFA(sample,
group=c(1, 4, 12),
type = c('n','s','s'),
ncp=12,
name.group=c('factor', 'purchases','seasonality'),
graph=FALSE, cores = 3)
# The dimension needs to be specified
mfa_data_reweight(dataset, mfa_res)
mfa_data_reweight(dataset, mfa_res, dim = 12)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.