This repository also includes a simulation framework to compare:
- Ours: split + Hoeffding-adjusted tolerance intervals
- GY: Guo–Young-style spline-based tolerance intervals (full-sample; no split)
All simulation code is under:
R/sim/: core functions (data generation, truth content, fitting, intervals, replication runner)scripts/: runnable entry scripts
Key files:
R/sim/data_generate.R:generate_data(model_id, n)for simulation modelsR/sim/truth_content.R:content_function(model_id, lower, upper, x)for true conditional contentR/sim/one_replication_ours.R: one replication for OursR/sim/one_replication_gy.R: one replication for GYR/sim/run_one_setting.R: runsMreplications and returns pointwise summaries for both methodsscripts/run_simulation_grid.R: runs a grid over models and sample sizes and saves results
content: target content level (e.g.,0.90)mis = 1 - content: miscoverage levelalpha: confidence error level (confidence is1 - alpha)n: sample size per replicationM: number of Monte Carlo replications per (model, n)
From the project root:
Rscript scripts/run_simulation_grid.RRscript scripts/make_plot.Rpointwise CSV with columns:
x: evaluation grid pointcoverage: proportion of replicatioin with `true_content(x) >= contentmean_width: mean interval with atxna_proportion: proportion of replications with NA/failed parametersmodel: model idn: sample sizeMethod:"Ours"or"GY"
- The evaluation grid is `x = seq(0, 10, length.out = n). For reproducibility, seed are managed inside the replication loop.
- Results (
results/,*.csv,*.png) are excluded.
- Guo, Y. and Young, D. S. (2024).
Approximate tolerance intervals for nonparametric regression models.
Journal of Nonparametric Statistics, 36(1), 212–239.
DOI: https://doi.org/10.1080/10485252.2023.2277260