Skip to contents

Reuses the supports, local charts, prediction supports, averaging weights, selected degree, and local-solver controls from an existing fit.malps object, then repeatedly calls refit with bootstrap-style case weights. This is a fixed-selection uncertainty diagnostic: it measures refit variability conditional on the fitted MALPS support profile and does not rerun cross-validation or rebuild supports in each replicate.

Usage

bootstrap.malps(
  object,
  B = 200L,
  weight.type = c("bayesian", "multinomial"),
  y = NULL,
  probs = NULL,
  conf.level = 0.95,
  seed = NULL,
  max.failures = max(10L, B),
  keep.weights = FALSE,
  verbose = FALSE,
  ...
)

Arguments

object

A "malps" object from fit.malps or refit.

B

Number of successful bootstrap replicates requested.

weight.type

Bootstrap weight generator, one of "bayesian" or "multinomial".

y

Optional response vector. Defaults to object$y.

probs

Optional nonnegative sampling probabilities for weight.type = "multinomial".

conf.level

Pointwise interval level used in the returned summary.

seed

Optional integer seed for reproducible bootstrap weights.

max.failures

Maximum failed refit attempts allowed before stopping.

keep.weights

Logical; store the generated bootstrap weights in the returned object.

verbose

Logical; emit progress messages every ten successful replicates.

...

Reserved for future extensions.

Value

A list of class "malps_bootstrap" containing:

  • replicate.fitted.values: an \(n \times B\) matrix of successful replicate fitted values;

  • replicate.weights: an optional \(n \times B\) matrix of bootstrap weights when keep.weights = TRUE;

  • failures: a data frame with columns attempt, failure, and message;

  • summary: pointwise fitted values, bootstrap summaries, and empirical lower/upper intervals;

  • bootstrap metadata such as B.completed, n.failures, conf.level, and weight.type.

Details

Two weight generators are available. "bayesian" draws positive exponential weights and rescales them to have mean one. This is the default because it preserves positive local support weights and therefore avoids many local-support degeneracies. "multinomial" draws ordinary nonparametric bootstrap counts with total count nrow(object$X); this can fail when a replicate assigns zero weight to all observations in a local support, and such failures are recorded.

Examples

X <- matrix(seq(0, 1, length.out = 20), ncol = 1)
fit <- fit.malps(X, X[, 1]^2, degree = 1L,
                 support.type = "knn", support.size = 8L)
bootstrap.malps(fit, B = 5L, seed = 1L)
#> MALPS fixed-selection bootstrap
#>   B completed: 5 
#>   weight.type: bayesian 
#>   failures: 0 
#>   conf.level: 0.95