Executed tutorials¶
These ten notebooks are complete scientific walkthroughs, not fragments. Every notebook is committed with outputs, assertions, and multiple plots; every page below extracts the runnable core, exact saved results, figure-by-figure interpretation, API map, exercises, and a constructive boundary around what the analysis justifies.
All datasets are synthetic. That keeps the examples reproducible and safe to share while leaving room for realistic clustered, longitudinal, dosing, and model-evidence workflows.
Materials and catalysis discovery¶
LMM · 120 runs · 3 figures
Rank five candidates at a reference temperature while separating shared batch variation, then compare conditional and population prediction.
Bernoulli GLMM · 96 runs · 3 figures
Estimate promoter and temperature effects with catalyst-lot clustering, conditional odds ratios, shrunken lot modes, and in-sample calibration.
MMRM · 144 observations · 3 figures
Compare formulation-specific activity loss across six cycles using an explicitly ordered AR(1) residual covariance.
Bio, pharma, and medical analysis¶
LMM · center + patient random intercepts · 3 figures
Separate multicenter and patient heterogeneity while interpreting a treatment-by-week biomarker trajectory.
MMRM · missing-response audit · 3 figures
Fit change from baseline with AR(1) covariance, preserve four exclusions, and construct adjusted treatment contrasts across visits.
Bernoulli GLMM · 14 clinics · 3 figures
Interpret cluster-conditional treatment odds, response curves, binned calibration, and clinic random-intercept modes.
Event semantics · provenance · 3 figures
Canonicalize dosing and observation records, resolve same-time order, expand ADDL and infusion stops, and audit every generated row.
PK/ODE simulation · sensitivities · 4 figures
Cross-check an IV-bolus ODE against closed form, compare administration routes, and decompose combined residual-error variance.
Typed model declaration · dependency graph · 3 figures
Declare constrained parameters, ETAs, states, dosing, and observation error; compile to an immutable ModelIR and verify deterministic round trips.
LMM · simulation · archives/interchange · 3 figures
Move from fit to residuals, VPC, reproducible simulation, integrity-checked archives, validation bundles, and conservative compatibility reports.
A suggested learning path¶
If you are new to mixed effects, start with 01, continue to 04, then compare 03 and 05 to understand LMM versus MMRM. Use 02 or 06 for link-scale GLMM interpretation. The pharmacometrics sequence is deliberately progressive:
07 event data → 08 numerical trajectories → 09 typed model contract
↓
10 evidence and interoperability
Validation contract¶
The plots shown in these pages are byte-for-byte extracts of the pre-executed
notebook outputs. scripts/extract_notebook_figures.py --check verifies all 31
images, their cell/output source, dimensions, alt metadata, and SHA-256 hashes.
The notebook validator independently checks execution counts, errors, assertions,
output hygiene, figure presence, and accessibility metadata.
- 1. Catalyst screening with a linear mixed model
- 2. Binary catalyst success with a generalized mixed model
- 3. Catalyst deactivation with repeated-measures covariance
- 4. Multicenter longitudinal biomarker with an LMM
- 5. Clinical-trial repeated measures with MMRM
- 6. Clustered binary response with a GLMM
- 7. Canonical pharmacometrics event semantics
- 8. Closed-form pharmacokinetics and event-aware ODE simulation
- 9. Pharmacometric declarations and the shared ModelIR
- 10. Diagnostics, simulation, validation evidence, interchange, and archives