Skip to contents

bootstrap_inference() either simulates responses from a fitted gamlss.longitudinal model, or resamples subjects with replacement, refits the same model to each bootstrap dataset, and summarizes the bootstrap distribution of selected fixed coefficients. It is intended for opt-in applied uncertainty checks and should be run with enough replicates outside CRAN-time tests for final reporting.

Usage

bootstrap_inference(
  object,
  R = 100,
  terms = NULL,
  level = 0.95,
  seed = NULL,
  fit_args = list(),
  keep_fits = FALSE,
  type = c("parametric", "cluster"),
  ...
)

Arguments

object

A fitted gamlss.longitudinal object.

R

Number of bootstrap replicates.

terms

Optional coefficient names, formula-term names such as "mu.treatment", coefficient-name prefixes, or numeric indices to summarize.

level

Confidence level for percentile intervals.

seed

Optional random seed.

fit_args

Optional named list of arguments passed to each refit, such as max_outer_iter, max_inner_iter, or convergence tolerances.

keep_fits

Logical; keep successful refitted model objects.

type

Character; "parametric" simulates from the fitted copula model, while "cluster" resamples subjects with replacement.

...

Additional arguments passed to simulate.gamlss.longitudinal().

Value

An object of class gamlss_longitudinal_bootstrap.