View source: R/bootstrap_and_leave_one_out.R
boot_coxrfx | R Documentation |
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",
...
)
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 |
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. |
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.
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.
Rui Costa
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.