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.