View source: R/bootstrap_and_leave_one_out.R
boot_ebmstate | R Documentation |
This function computes bootstrap samples of regression coefficients, cumulative hazard functions, and transition probability functions.
boot_ebmstate(
mstate_data = NULL,
which_group = NULL,
min_nr_samples = NULL,
patient_data = NULL,
initial_state = NULL,
tmat = NULL,
time_model = NULL,
backup_file = NULL,
input_file = NULL,
coxrfx_args = NULL,
msfit_args = NULL,
probtrans_args = NULL
)
mstate_data |
A data frame with outcome and covariate data in long format. |
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. |
patient_data |
The covariate data for which the estimates of cumulative hazards and transition probabilities are computed. Must contain: one row of data for each transition, all the covariate columns in the fitted model, and also the 'strata' column. |
initial_state |
The initial state for which transition probability estimates should be computed |
tmat |
Transition matrix for the multi-state model, as obtained by running |
time_model |
The model of time-dependency: either 'clockforward' or 'clockreset'. |
backup_file |
Path to file. Objects generated while the present function is running are stored in this file.
This avoids losing all estimates if and when the algorithm breaks down. See argument |
input_file |
Path to |
coxrfx_args |
Named list with arguments to the |
msfit_args |
Named list with arguments to the |
probtrans_args |
Named list with arguments to the |
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. covariate_df
should only contain the covariates
of the model one wishes to estimate.
A list with: 95% bootstrap intervals for each regression coefficient and for transition probabilities; bootstrap samples of regression coefficients, cumulative hazards and transition probabilities.
Rui Costa
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.