bootstrapMSmix {MSmix}R Documentation

Bootstrap confidence intervals for mixtures of Mallows models with Spearman distance

Description

Return the bootstrap confidence intervals for the parameters of a mixture of Mallow models with Spearman distance fitted on partial rankings.

plot method for class "bootMSmix".

Usage

bootstrapMSmix(
  object,
  rankings,
  n_boot = 50,
  conf_level = 0.95,
  type = (if (n_clust == 1) "non-parametric" else "soft"),
  n_start = 10,
  mc_em = FALSE,
  item_names = NULL,
  all = FALSE,
  parallel = FALSE
)

## S3 method for class 'bootMSmix'
plot(x, ...)

Arguments

object

An object of class "emMSmix" returned by fitMSmix.

rankings

Integer N\timesn matrix with the rankings on which the mixture of Mallows models has been fitted.

n_boot

Number of desired bootstrap samples. Defaults to 50.

conf_level

Value in the interval (0,1) indicating the desired confidence level of the interval estimates. Defaults to 0.95.

type

Character indicating which bootstrap method must be used. Available options are: "non-parametric" or "parametric", for the G=1 case, and "soft" or "separated", for the G>1 case. Defaults to "soft" when n_clust > 1 and to "non-parametric" when n_clust = 1. See Details.

n_start

Number of starting points for the MLE on each bootstrap sample. Defaults to 10.

mc_em

Logical: whether the Monte Carlo EM algorithm must be used for MLE on partial rankings. Ignored when rankings does not contain any partial sequence. Defaults to FALSE.

item_names

Character vector for the names of the items. Defaults to NULL, meaning that colnames(rankings) is used and, if not available, item_names is set equal to "Item1","Item2",....

all

Logical: whether the bootstrap samples of the MLEs for all the parameters must be returned. Defaults to FALSE.

parallel

Logical: whether parallelization over multiple initializations of the EM algorithm must be used. Used when rankings contains some partial rankings. Defaults to FALSE.

x

An object of class "bootMSmix" returned by bootstrapMSmix.

...

Further arguments passed to or from other methods (not used).

Details

When n_clust = 1, two types of bootstrap are available: 1) type = "non-parametric" (default); type = "parametric", where the latter supports full rankings only.

When n_clust > 1, two types of bootstrap are available: 1) type = "soft" (default), which is the soft-separated bootstrap (Crispino et al., 2024+) and returns confidence intervals for all the parameters of the mixture of Mallow models with Spearman distance; 2) type = "separated", which is the separated bootstrap (Taushanov and Berchtold, 2019) and returns bootstrap samples for the component-specific consensus rankings and precisions.

Value

An object of class "bootMSmix", namely a list with the following named components:

itemwise_ci_rho

The bootstrap itemwise confidence intervals for the component-specific consensus rankings.

ci_boot_theta

The bootstrap confidence intervals for the component-specific precisions.

ci_boot_weights

The bootstrap confidence intervals for the mixture weights. Returned when n_clust > 1 and type == "soft", otherwise NULL.

boot

List containing all the n_boot bootstrap parameters. Returned when all = TRUE, otherwise NULL.

The boot sublist contains the following named components:

rho_boot

List of length n_clust with the bootstrap MLEs of the consensus rankings. Each element of the list is an integer n_boot \times n_items matrix containing, in each row, the bootstrap MLEs of the consensus ranking for a specific component.

theta_boot

Numeric n_boot\times n_clust matrix with the bootstrap MLEs of the component-specific precision parameters in each row.

weights_boot

Numeric n_boot\times n_clust matrix with the bootstrap MLEs of the mixture weights in each row. Returned when n_clust > 1 and type = "soft", otherwise NULL.

For the component-specific bootstrap consensus ranking estimates, a heatmap is returned.

For the component-specific precisions and weights (for the latter when G > 1), a kernel density plot is returned.

References

Crispino M, Mollica C, Modugno L, Casadio Tarabusi E, and Tardella L (2024+). MSmix: An R Package for clustering partial rankings via mixtures of Mallows Models with Spearman distance. (submitted)

Taushanov Z and Berchtold A (2019). Bootstrap validation of the estimated parameters in mixture models used for clustering. Journal de la société française de statistique, 160(1).

Efron B (1982). The Jackknife, the Bootstrap, and Other Resampling Plans. Philadelphia, Pa. :Society for Industrial and Applied Mathematics.

Examples


## Example 1. Compute the bootstrap 95% confidence intervals for the Antifragility dataset.
# Let us assume no clusters.
set.seed(12345)
fit <- fitMSmix(rankings = ranks_antifragility, n_clust = 1, n_start = 1)
# Apply non-parametric bootstrap procedure.
set.seed(12345)
boot_np <- bootstrapMSmix(object = fit, rankings = ranks_antifragility, n_boot = 200)
boot_np$itemwise_ci_rho; boot_np$ci_boot_theta;
# Apply parametric bootstrap procedure and set all = TRUE
# to return the bootstrap MLEs of the consensus ranking.
set.seed(12345)
boot_p <- bootstrapMSmix(object = fit, rankings = ranks_antifragility, n_boot = 200,
                       type = "parametric", all = TRUE)
boot_p$itemwise_ci_rho; boot_p$ci_boot_theta;
plot(boot_p)

## Example 2. Compute the bootstrap 95% confidence intervals for the Antifragility dataset.
# Let us assume two clusters and apply soft bootstrap.
set.seed(12345)
fit <- fitMSmix(rankings = ranks_antifragility, n_clust = 2, n_start = 20)
set.seed(12345)
boot_soft <- bootstrapMSmix(object = fit, rankings = ranks_antifragility, n_boot = 500,
                      n_start = 20, all = TRUE)
plot(boot_soft)
# Apply separated bootstrap and compare results.
set.seed(12345)
boot_sep <- bootstrapMSmix(object = fit, rankings = ranks_antifragility, n_boot = 500,
                     n_start = 20, type = "separated", all = TRUE)
plot(boot_sep)
boot_soft$itemwise_ci_rho; boot_soft$ci_boot_theta; boot_soft$ci_boot_weights;
boot_sep$itemwise_ci_rho; boot_sep$ci_boot_theta; boot_soft$ci_boot_weights;



[Package MSmix version 1.0.1 Index]