View source: R/fpr_calibration.R
| fpr_calibration_transfer | R Documentation |
Uses the implied L_{\text{eff}} from a calibrated
fpr_calibration object to predict the procedure-level FPR at
(c_1 + \delta_1, c_2 + \delta_2), then optionally runs a direct
simulation at the new pair to validate the prediction.
fpr_calibration_transfer(
cal_result,
delta = c(0.05, 0.1, 0.2),
delta_c1 = NULL,
delta_c2 = NULL,
nsims_check = 200L,
...
)
cal_result |
An object of class |
delta |
Numeric scalar. Added to both |
delta_c1 |
Numeric or |
delta_c2 |
Numeric or |
nsims_check |
Integer. Simulations to run at the new pair for empirical validation. Default 200. Set to 0 to skip. |
... |
Additional arguments passed to |
A data frame with one row per delta value containing:
c1_new, c2_new, P1_new, fpr_pred
(predicted corrected FPR using transferred L_eff_implied),
fpr_sim (direct simulation, if nsims_check > 0),
fpr_sim_lo, fpr_sim_hi (95\
(whether fpr_pred falls within the simulation CI).
## Not run:
# Calibrate at base pair
cal <- fpr_calibration(c1 = 1.70, c2 = 1.70, null_fn = my_dgm,
n_sample = 500, fs_params = fs_binary,
nsims = 200, n_min = 60,
outcome_type_approx = "binary", p_event = 0.30)
# Predict at base + 0.05, +0.10, +0.20 and validate
transfer_results <- fpr_calibration_transfer(
cal, delta = c(0.05, 0.10, 0.20),
nsims_check = 200, n_workers = 4)
print(transfer_results)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.