Skip to content

Bootstrap results (SEs and CIs) not appearing despite n_boot and boot_diag enabled #48

@tanyatoluay

Description

@tanyatoluay

Issue:
I'm running the gformula() function with bootstrapping enabled (n_boot = 1000) and diagnostics (boot_diag = TRUE) to obtain standard errors and confidence intervals. However, the output still contains NA for SEs and CIs, and calling summary(gform_result)$boot_table returns NULL.

The model itself seems to fit well and produces predicted means, but no bootstrap results are saved or shown.

What I've tried:

  • Set n_boot = 1000 in the function call.
  • Enabled boot_diag = TRUE to get diagnostic output.
  • Verified the model fits without warnings or errors.
  • Attempted to inspect bootstrapping diagnostics (no clear failures shown).
  • Checked for bootstrap results in the returned object (boot_table, boot_diag_results) but they are missing or NULL.
  • Made sure to set a random seed.

Minimal reproducible example code:

gform_result <- gformula(
  obs_data = df_final,
  outcome_type = outcome_type,
  id = id_name,
  time_name = time_name,
  time_points = time_points,
  outcome_name = outcome_name,
  covnames = covnames,
  basecovs = basecovs,
  covtypes = covtypes,
  histories = histories,
  histvars = histvars,
  covparams = covparams,
  ymodel = ymodel,
  intvars = intvars,
  interventions = interventions,
  int_descript = int_descript,
  nsimul = nsimul,
  n_boot = 1000,
  seed = seed,
  parallel = parallel,
  nsamples = nsamples,
  model_fits = TRUE,
  boot_diag = TRUE
)

summary(gform_result)$boot_table  # returns NULL

Question:
Is there something else I need to enable or check to get bootstrap SEs and confidence intervals in the output? Are there known issues with bootstrapping results not being saved?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions