# Synthetic logistic reproducibility example This example runs the existing logistic analysis functions on reproducible, generic synthetic `x` and `y` data. The predictor is not on the SUV scale and does not represent a clinical biomarker. It is a software and reproducibility test, not a statistical or clinical validation of the models. Run from any directory with: ```bash python examples/logistic_synthetic/run_synthetic_logistic.py ``` The same workflow is also available as four independent stages: ```text synthetic_logistic_01.py data, fitting, and goodness of fit synthetic_logistic_02.py uncertainty intervals and confidence bands synthetic_logistic_03.py elasticity of x50 and s50 synthetic_logistic_04.py additive and multiplicative measurement noise ``` `synthetic_logistic_notebook.ipynb` presents these stages in one clean notebook that can be restarted and run from top to bottom without hidden state. The script uses fixed random seeds and writes the generated data, tables, and figures to `examples/logistic_synthetic/outputs/`. Set `SYNTHETIC_OUTPUT_DIR` to write a run to a different folder, for example when an existing PDF is open and locked by a viewer on Windows. The measurement-noise magnitudes can be changed with `SYNTHETIC_NOISE_MULT` and `SYNTHETIC_NOISE_ADD_SD_FRACTION`. The latter sets additive noise as a fraction of the sample standard deviation of `x`. For a faster smoke test, reduce the replication counts with environment variables: ```bash SYNTHETIC_BOOTSTRAPS=100 SYNTHETIC_MC_DRAWS=5000 SYNTHETIC_NOISE_REFITS=50 SYNTHETIC_NOISE_DRAWS=500 python examples/logistic_synthetic/run_synthetic_logistic.py ``` The example tests: - RAW and LOG logistic fitting and goodness-of-fit; - Wald, MCA, NPBS, and PBS intervals and pointwise confidence bands; - intervals for `x50` and `s50`; - local elasticity of `x50` and `s50`; and - additive and multiplicative measurement-noise propagation under fixed-model and refitting analyses. The synthetic `TRIM` input is created deterministically by removing one high-valued NC observation. This is included only to exercise the same two-data set code paths as the clinical workflow. It does not imply that trimming improves a model or validates the FULL--TRIM analysis.