View source: R/fs_declaration_table.R
| fs_declaration_table | R Documentation |
Reads the two fs_declaration_calibration() results a report needs from one fit (at
the protected levels c0, and at the claim threshold) with the fit's declaration
field, into one tidy table. Nothing is redrawn: the calibration reads the multiplier
draws the fit already made.
fs_declaration_table(fit, alpha = 0.1, c0 = NULL, c0_primary = NULL)
fit |
A |
alpha |
Target family-wise declaration rate. Default 0.10. |
c0 |
|
c0_primary |
Optional. The level, among |
fw_size is the family-wise size of the screen as executed, were every candidate to
carry a uniform effect of c0; at the claim threshold it is a boundary size.
A plain data frame with one row per c0, then the claim-threshold row:
row: "c0" or "claim_threshold".
c0: the level (NA on the claim-threshold row).
primary: logical: the row is c0_primary.
alpha, as given.
n_region: the declared subgroup's size.
T_region, T_max: the statistic of the declared subgroup and the largest in the
family.
kappa_hat: the calibrated cutoff.
implied_level: 2\Phi(\hat\kappa) - 1.
fw_size: see above.
n_admitted: the candidates the calibrated rule admits at this row.
admits_none: logical: the calibrated rule admits nothing at any row.
source: where the shifted maxima came from, "capture" or "field_matrix" (NA
on the claim-threshold row).
fs_declaration_calibration().
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(ci_method = "ij", draws = 500, keep_declaration_field = TRUE,
declaration_c0 = c(0.6, 0.7)),
parallel_args = list(plan = "sequential"), quiet = TRUE, details = FALSE,
plot.sg = FALSE, show_candidate_summary = FALSE)
fs_declaration_table(fit, c0 = c(0.6, 0.7), c0_primary = 0.7)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.