ddhazard_boot {dynamichazard} | R Documentation |
See the vignette vignette("Bootstrap_illustration", "dynamichazard")
. The do_stratify_with_event
may be useful when either cases or non-cases are very rare to ensure that the model estimation succeeds.
ddhazard_boot(ddhazard_fit, strata, unique_id, R = 100, do_stratify_with_event = F, do_sample_weights = F, LRs = ddhazard_fit$control$LR * 2^(0:(-4)), print_errors = F)
ddhazard_fit |
returned object from a |
strata |
strata to sample within. These need to be on an individual by individual basis and not rows in the design matrix. |
unique_id |
unique ids where entries match entries of |
R |
number of bootstrap estimates. |
do_stratify_with_event |
|
do_sample_weights |
|
LRs |
learning rates in decreasing order which will be used to estimate the model. |
print_errors |
|
An object like from the boot
function.
## Not run: library(dynamichazard) set.seed(56219373) fit <- ddhazard( Surv(time, status == 2) ~ log(bili), pbc, id = pbc$id, max_T = 3000, Q_0 = diag(1, 2), Q = diag(1e-4, 2), by = 100, control = ddhazard_control(method = "GMA")) bt <- ddhazard_boot(fit, R = 999) plot(fit, ddhazard_boot = bt, level = .9) ## End(Not run)