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,
  n_boot = 50,
  type = (if (object$em_settings$n_clust == 1) "non-parametric" else "soft"),
  conf_level = 0.95,
  all = FALSE,
  n_start = 10,
  parallel = FALSE
)

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

Arguments

object

An object of class "emMSmix" returned by fitMSmix.

n_boot

Number of desired bootstrap samples. Defaults to 50.

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 "non-parametric" when n_clust = 1 and to "soft" when n_clust > 1. See Details.

conf_level

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

all

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

n_start

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

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 and Modugno 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.
r_antifrag <- ranks_antifragility[, 1:7]
set.seed(12345)
fit <- fitMSmix(rankings = r_antifrag, n_clust = 1, n_start = 1)
# Apply non-parametric bootstrap procedure.
set.seed(12345)
boot_np <- bootstrapMSmix(object = fit, n_boot = 200)
print(boot_np)
# 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, n_boot = 200,
                       type = "parametric", all = TRUE)
print(boot_p)
plot(boot_p)

## Example 2. Compute the bootstrap 95% confidence intervals for the Antifragility dataset.
# Let us assume two clusters and apply soft bootstrap.
r_antifrag <- ranks_antifragility[, 1:7]
set.seed(12345)
fit <- fitMSmix(rankings = r_antifrag, n_clust = 2, n_start = 20)
set.seed(12345)
boot_soft <- bootstrapMSmix(object = fit, 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, n_boot = 500,
                     n_start = 20, type = "separated", all = TRUE)
plot(boot_sep)
print(boot_soft)
print(boot_sep)



[Package MSmix version 1.0.2 Index]