Multiple Imputation in Cluster Analysis
Overview
Implementation of a framework for cluster analysis with selection of the final number of clusters and an optional variable selection procedure. The package is designed to integrate the results of multiple imputed datasets while accounting for the uncertainty that the imputations introduce in the final results. In addition, the package can also be used for a cluster analysis of the complete cases of a single dataset. The package also includes specific methods to summarize and plot the results. The methods are described in Basagana et al. (2013) doi:10.1093/aje/kws289.
Minor changes:
- Dependences:
- The package is now completely independent of the
irrpackage, which was previously used to internally calculate Cohen's Kappa (irr::kappa2). Now, Cohen's Kappa is calculated using a native base implementation to improve stability and maintainability. In addition, the Cohen's Kappa calculation is now faster. - Documentation:
- Updated source code documentation to comply with the latest
roxygen2(v8.0.0) standards. - Improved
README.Rmdplot rendering. - Integrated documentation for
miclust()and its related methodsprint.miclust()andplot.miclust()into a single help page for a more fluid usage. - Integrated documentation for methods
summary.miclust()andprint.summary.miclust(). miclust:- The width of the verbose message has been reduced (now, breaks line each 20 imputations).
print.miclust:- Fix erratum in labels of the output of
print.miclust.
Show all changes in 1.3.0Hide the rest of the changes in 1.3.0
plot.miclust:- New parameter
metric, to select which metric is displayed. Defaults to"all", maintaining compatibility with the output from versions 1.2.8 and earlier. Other options are:"nclfreq"(percentage of times each number of clusters has been selected);"critcf"(critCF distribution for each number of clusters);"nvarfreq"(distribution of the number of selected variables), and"varsel"(percentage of appearance of the variables that remained in the final set of selected variables). - New parameters
col.nclfreq,col.critcf,col.nvarfreq, andcol.varsel, to customize the color used in the plots for metrics,"nclfreq","critcf","nvarfreq", and"varsel", respectively. Default values are consistent with results under versions 1.2.8 and earlier. - New parameter
col.all. When specified, it overridescol.nclfreq,col.critcf,col.nvarfreq, andcol.varsel, and applies that color across the entire panel. Default (NULL) is consistent with results under versions 1.2.8 and earlier. summary.miclust:- Fix output errors related to within-cluster missingness of the selected variables.
- Fix an internal error in
summary.miclust()(originally triggered duringkcca()execution insideassignprobandkappas()) that occurred when a specific imputation or the final assigned clustering result contained an empty cluster. Specifically, add a validation check insummary.miclust()to detect empty clusters across all imputations and the assigned cluster for the givenk. The function now prints the affected cases and halts execution with a detailed error message. - An internal error in
summary.miclust()(originally triggered duringkcca()execution insideassignprobandkappas()) occurs when the final clustering for a givenkand the set of selected variables results in an empty cluster within specific imputed datasets. This indicates that such a combination ofkand selected variables is unable to find as many clusters as requested. A validation check has been added insummary.miclust()to detect these scenarios and halt execution with a detailed error message. print.summary.miclust:- The
Within-cluster summarysection of the output has changed. To reduce the output width, the columns for missingness, mean, and standard deviation have been collapsed into a single column. The section label has been changed toWithin-cluster summary [%miss.;mean;sd]. Separated columns (version <= 1.2.8 style) are still available in thesummarybyclusterelement of the object.
<hr style="border:2px solid gray"> </hr>
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-09
- ERROR12 OK, 1 ERROR2026-06-08
- OK14 OK2026-03-10
Documentation
- Help pages
- 6includes a package overview page
- Examples that run
- 60%3 run in a plain check · 2 hold no code
- Exported functions with examples
- 100%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 33%
Downloads
Dependencies
Installing miclust adds 48 packages (27 with compiled code, 42 MB of source tarballs). Heaviest: stringi 11 MB, ggplot2 6.0 MB, doBy 4.3 MB.
Code & Tests
Datasets
People & History
Package metadata
- First published
- 2021-03-10
- Total releases
- 4 / 5 yrs
- License
- GPL-3 OSI
- Minimum R
- ≥ 4.1
- Bundled data
- 2.5 KB / 1 file
- Download size
- 166 KB
Cite
Cite this package
Run in R for the authors' entry:
citation("miclust")The package provides a citation file, so citation() returns the authors' own entry.
It points to 10.1093/aje/kws289.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-18, which the citation names so these numbers can be found later. More on citing and the projects behind them.