| mr_method_tables | R Documentation |
Plain data frames for the comparison of a forestsearch() analysis's naive
estimates with its full-bootstrap and multiplier-resampling corrections, method by
method; the caller styles them.
mr_method_comparison(fits, boots, est.scale = "hr", digits = 2)
mr_cost_table(fits, boots, boot_seconds = NULL, project_B = 1000L)
fits |
A named list of |
boots |
A list of |
est.scale |
|
digits |
Decimals of the estimates. Default 2. |
boot_seconds |
The wall-clock seconds of each bootstrap, a vector named by
method. |
project_B |
The number of replicates to project the cost to. Default 1000. |
What the comparison shows. The table compares displays; it does not adjudicate
one quantity. The bootstrap column carries the point estimate only: at a small B
that point is an illustration, and its interval is not a result. For families
generated from a model (the DINA and GRF paths), the full bootstrap, which re-runs the
search in every replicate, and multiplier resampling, which perturbs one fixed
family, target different estimands.
mr_cost_table()'s mr_seconds is the multiplier stage as the fit records it
(mr_inference$timing_seconds), and the projection is linear in B at the worker
count the bootstrap ran on.
mr_method_comparison(): a plain data frame with two rows per method, H and
Hc: method, region, n (patients, with their percent), naive (estimate with
its robust 95% interval), bootstrap (the point estimate), and multiplier (the
two-term de-biased estimate with its IJ 95% interval). The interval reads NA on a
fit whose stored limits are not the two-term IJ interval; see mr_values().
mr_cost_table(): a plain data frame with one row per method: method,
mr_seconds, bootstrap_B, bootstrap_seconds, seconds_per_replicate, and
projected_B_<project_B>.
mr_values(), mr_estimates_table(), forestsearch_bootstrap_dofuture().
set.seed(1)
n <- 500
d <- data.frame(id = seq_len(n), treat = rbinom(n, 1, 0.5), x1 = rnorm(n), x2 = rnorm(n))
d$time <- rexp(n, 0.1 * ifelse(d$treat == 1, ifelse(d$x1 < -0.6, 3, 0.45), 1))
d$event <- as.integer(d$time < 30)
d$time <- pmin(d$time, 30)
fit <- forestsearch(
df.analysis = d, outcome.name = "time", event.name = "event", treat.name = "treat",
id.name = "id", confounders.name = c("x1", "x2"), use_grf = FALSE, use_lasso = FALSE,
maxk = 1, fs.splits = 200, sg_focus = "hrMaxSG", mr_inference = TRUE,
mr_inference_args = list(draws = 200, field_R_out = 50, field_R_in = 25),
parallel_args = list(plan = "sequential"), quiet = TRUE, details = FALSE,
plot.sg = FALSE, show_candidate_summary = FALSE)
boot <- forestsearch_bootstrap_dofuture(fit, nb_boots = 2,
parallel_args = list(plan = "sequential"))
mr_method_comparison(list(FS = fit), list(FS = boot))
mr_cost_table(list(FS = fit), list(FS = boot))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.