bootcov2 {coxed} | R Documentation |
Boostrapping algorithm for coxed
Description
This function uses bootstrapping to create standard errors and
confidence intervals for the quantities produced by the coxed()
function. It is adapted from the bootcov
function
in the rms
package. It is called by the coxed
function and is not intended to be used by itself. Please refer to
the original bootcov
function for general bootstrapping
applications.
Usage
bootcov2(fit, cluster, B = 200, fitter, coef.reps = TRUE,
loglik = FALSE, pr = FALSE, maxit = 15, group = NULL,
stat = NULL)
Arguments
fit |
an estimated Cox proportional hazards model object with class "coxph" or "cph" |
cluster |
a variable indicating groupings. |
B |
Number of bootstrap simulation iterations |
fitter |
the name of a function with arguments |
coef.reps |
set to |
loglik |
set to |
pr |
set to |
maxit |
maximum number of iterations, to pass to |
group |
a grouping variable used to stratify the sample upon bootstrapping. This
allows one to handle |
stat |
a single character string specifying the name of a |
Details
This function contains the same code as the bootcov
function in
the rms
package, with a few alterations to work better with the coxed
function. First, we output a result attribute b.ind
, which contains the observation numbers from the estimation sample
that are drawn with replacement to produce the bootstrap sample and takes into account clustering.
Second, we program a new class, tvc
, for
fitter
to use agreg.fit
instead of coxph.fit
when the data contain time-varying covariates.
Author(s)
Jonathan Kropko <jkropko@virginia.edu> and Jeffrey J. Harden <jharden@nd.edu>, based
on the code for the bootcov
function in the rms
package
by Frank Harrell and Bill Pikounis