boot_coxrfx function

Bootstrap confidence intervals for regression coefficients

Bootstrap confidence intervals for regression coefficients

This function computes 95% highest density bootstrap confidence intervals (non-parametric) for the regression coefficients estimated by CoxRFX.

boot_coxrfx( mstate_data_expanded, which_group, min_nr_samples = 100, output = "CIs", ... )

Arguments

  • mstate_data_expanded: Data in long format, possibly with expanded covariates (as obtained by running mstate::expand.covs).
  • which_group: A character vector with the same meaning as the groups argument of the function CoxRFX but named (with the covariate names).
  • min_nr_samples: The confidence interval of any coefficient is based on a number of bootstrap samples at least as high as this argument. See details.
  • output: Determines the sort of output. See value.
  • ...: Further arguments to the CoxRFX function.

Returns

For each regression coefficient, the confidence intervals and the number of bootstrap samples on which they are based, if the output argument is equal to CIs; if output is equal to CIs_and_coxrfx_fits, also the CoxRFX objects for each bootstrap sample.

Details

In a given bootstrap sample there might not be enough information to generate estimates for all coefficients. If a covariate has little or no variation in a given bootstrap sample, no estimate of its coefficient will be computed. The present function will keep taking bootstrap samples until every coefficient has been estimated at least min_nr_samples times.

Author(s)

Rui Costa

  • Maintainer: Rui Costa
  • License: GPL (>= 3)
  • Last published: 2024-10-19

Useful links