Skip to contents

Data-generating process

Helpers for the simulation studies used in the manuscript.

f_true()
True dose-response used by the simulation DGP
build_sigma_u()
Build a measurement-error covariance from marginal variances and a correlation
sigma_u_for_reliability()
Build a measurement-error covariance targeting a given reliability
generate_aft_data()
Generate one Monte Carlo replicate of the AFT-spline-SIMEX scenario

Phase 1 — Measurement-error calibration

Multivariate ME model and the GLS combiner.

fit_me_calibration()
Fit the Phase-1 multivariate ME calibration model
gls_combine()
GLS-combine surrogate columns into a single calibrated exposure
extract_surrogate_cols()
Identify surrogate-measurement columns in a data frame

Phase 2 — AFT-spline fitting and SIMEX

The estimator pipeline.

fit_aft_spline()
Fit an AFT model with a natural-cubic-spline exposure
predict_curve()
Predict the centred dose-response curve at a reference covariate setting
simex_aft_spline()
SIMEX-correct the AFT-spline dose-response curve
summary(<simex_aft_spline>)
Summarise a SIMEX-corrected AFT-spline fit
plot(<simex_aft_spline>)
Plot a SIMEX-corrected AFT-spline fit

Inference — two-stage bootstrap

two_stage_bootstrap()
Two-stage nonparametric bootstrap for the SIMEX-corrected curve
summary(<two_stage_bootstrap>)
Summarise a two-stage bootstrap SIMEX dose-response fit

Evaluation and visualisation

compute_ise()
Integrated squared error of a fitted curve against the truth
plot_curves()
Overlay fitted dose-response curves with the truth and an optional CI
stagill_palette()
StaGILL lab palette for this project
method_colors()
Semantic method-to-colour mapping for Naive / Oracle / SIMEX comparisons