View source: R/fs_bias_coverage.R
| fs_sim_bias_coverage | R Documentation |
From a combined bundle's per-replicate results (the recorder columns of
the fb_mr_field template family: nv_H_*, mr_H_*, fld_H_*,
betaHhat_H, detected, and their Hc twins), computes, per estimator
over the detected replicates: the retained bias on the log scale, the
empirical SD of the log estimate, the mean reported SE, their ratios
b = bias_log / sd_emp and r = se_mean / sd_emp, the observed one- and
two-sided coverage of the target with Wilson intervals, and the Gaussian
reference coverages at (b, r).
fs_sim_bias_coverage(
results,
block = c("H", "Hc"),
estimators = c("naive", "mr", "fld"),
level = 0.95,
target = "betaHhat",
side = c("lower", "upper"),
scale = c("log", "identity")
)
results |
Data frame of per-replicate records from a combined bundle
( |
block |
|
estimators |
Subset of |
level |
Coverage level (default 0.95). |
target |
|
side |
|
scale |
|
Conventions: the
one-sided lower bound is the stored fld_<block>_lo1s for the field row
and exp(log est - qnorm(level) * SE) for naive and MR (IJ); two-sided
coverage uses each estimator's stored bounds; the field estimator is the
shrunk-field est2 with the two-sided Lambda-quantile interval. Under
side = "upper" (the complement's benefit-claim orientation) the one-sided coverage is
truth <= upper bound, with the field's stored fld_<block>_up1s and
exp(log est + qnorm(level) * SE) for naive and MR (IJ), and the Gaussian
reference is Phi(z_level * r + b) – a positive retained bias helps an
upper bound where it hurts a lower one.
Data frame, one row per estimator: estimator, n, bias_log,
sd_emp, se_mean, b, r, cov1, cov1_wilson_lo,
cov1_wilson_hi, cov2, cov2_wilson_lo, cov2_wilson_hi,
cov1_ref, cov2_ref.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.