Skip to contents

Core Estimators

Main functions for debiased prevalence estimation

ppi_point_and_ci()
Prediction-powered mean estimator with logit CI.
ppi_pp_point_and_ci()
PPI++ estimator with optimal unconstrained lambda.
rg_point_and_ci()
Rogan-Gladen corrected estimator with finite-sample adjustment.
eif_point_and_ci()
EIF (Efficient Influence Function) estimator for binary surrogates.
mle_point_and_ci()
MLE estimator with consistent output format.
fit_misclass_mle()
Joint MLE under the binary misclassification model.
grab_theta()
Grab the theta-specific summary from a joint MLE fit.

Discrete Estimators

Estimators for discrete outcomes

eif_discrete_point_and_ci()
EIF estimator with per-category calibration (optimal for discrete)
eif_gam_discrete_point_and_ci()
EIF estimator with GAM calibration
eif_linear_discrete_point_and_ci()
EIF estimator with linear calibration (suboptimal for discrete)
eif_spline_discrete_point_and_ci()
EIF estimator with spline calibration
naive_discrete_point_and_ci()
Naive estimator: just use mean of discrete predictions
oracle_discrete_point_and_ci()
Oracle estimator (knows true \(\mu\) values)
ppi_discrete_point_and_ci()
PPI estimator for discrete predictions
ppi_pp_discrete_point_and_ci()
PPI++ estimator for discrete predictions

Continuous Estimators

Estimators for continuous outcomes

eif_continuous_point_and_ci()
EIF estimator for continuous surrogates with calibration
naive_continuous_point_and_ci()
Naive estimator (just use model predictions)
ppi_continuous_point_and_ci()
PPI estimator for continuous scores
ppi_pp_continuous_point_and_ci()
PPI++ estimator for continuous scores

Calibration Functions

Functions for fitting calibration models

fit_calibration_gam()
Fit calibration model using GAM
fit_calibration_isotonic()
Fit calibration model using isotonic regression
fit_calibration_linear()
Fit calibration model using linear regression
fit_calibration_spline()
Fit calibration model using cubic spline

Data Generation

Functions for generating simulated data

generate_discrete_dgp()
Generate discrete prediction data

Helper Functions

Utility functions

logit_ci()
Wald-style confidence interval via logit transform.

Visualization

Plotting functions for simulation results

plot_coverage()
Plot empirical coverage across simulation settings
plot_ci_width()
Plot mean confidence interval width across simulation settings
plot_bias()
Plot estimator bias across simulation settings
plot_bias_pct()
Plot percent bias across simulation settings
plot_q_bias()
Plot calibration bias for \(\hat q_0\) and \(\hat q_1\)
build_line_plot()
Generic line plot builder
generate_plot_suite()
Generate all 5 standard plots for a given data subset
get_method_color_scale()
Get the fixed color scale for methods
plot_base_theme()
Base theme for standard plots
plot_base_theme_aggregate()
Larger legend theme for aggregate plots (stacked in two rows)
format_label_ratio()
Format a labeling ratio as a percentage string