View source: R/functions_tools.r
prune.mca | R Documentation |
This function tests and removes variables that have no or too few relations with other variables. In other words variables that only contribute with random noise to the analysis. Removing these variables will tend to increase the strength of the first dimensions and give a wider dispersion of the cloud of cases on the first dimensions. Removing these variables can also give a simpler analysis that is easier to interpret and communicate. The core of the pruning procedure uses the mca.eigen.check to construct a weighted network of relations between variables. Tie strength is measured by the first eigenvalue of an MCA between the two variables. Ties between variables with a weak relationship are removed and variables with few connections to other variables are discarded. With the default values a analysis without irrelevant variables is unchanged. Note that passive categories are inherited from the original analysis and are not included in the mca.eigen.check. This procedure does not help with variables that are too strongly related.
prune.mca(
r,
eigen.cut.off = 0.55,
network.pruning = TRUE,
average.pruning = FALSE,
min.degree = 1
)
r |
a result object from soc.mca |
eigen.cut.off |
the cut.off for the first eigen value from mca.eigen.check |
network.pruning |
If TRUE variables are pruned on the basis their degree |
average.pruning |
If TRUE variables with a sum of ties below average are discarded. This |
min.degree |
the minimum number of ties a variable has to have to remain in the analysis |
A list containing:
var |
a tibble with the weighted degree of the variables |
mca.eigen.check |
The results from mca.eigen.check |
g |
a network graph - see igraph |
remaining.var |
a character vector with the names of the remaining variables |
removed |
a character vector with the names of the removed variables |
pruned.r |
A pruned version of the original soc.mca object |
Inspired by: Durand, Jean-Luc, and Brigitte Le Roux. 2018. “Linkage Index of Variables and its Relationship with Variance of Eigenvalues in PCA and MCA.” Statistica Applicata 29(2):123–35. doi: 10.26398/ijas.0029-006.
example(soc.mca)
pr <- prune.mca(result)
pr$removed # This example has no irrelevant variables so nothing is removed
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.