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

01 · Screen catalyst candidates

LMM · 120 runs · 3 figures

Rank five candidates at a reference temperature while separating shared batch variation, then compare conditional and population prediction.

Catalyst screening with a linear mixed model
02 · Model activation success

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.

Binary catalyst success with a generalized mixed model
03 · Analyze deactivation

MMRM · 144 observations · 3 figures

Compare formulation-specific activity loss across six cycles using an explicitly ordered AR(1) residual covariance.

Catalyst deactivation with repeated-measures covariance

Bio, pharma, and medical analysis

04 · Multicenter biomarker trajectories

LMM · center + patient random intercepts · 3 figures

Separate multicenter and patient heterogeneity while interpreting a treatment-by-week biomarker trajectory.

Multicenter longitudinal biomarker with an LMM
05 · Clinical-trial repeated measures

MMRM · missing-response audit · 3 figures

Fit change from baseline with AR(1) covariance, preserve four exclusions, and construct adjusted treatment contrasts across visits.

Clinical-trial repeated measures with MMRM
06 · Clustered binary medical response

Bernoulli GLMM · 14 clinics · 3 figures

Interpret cluster-conditional treatment odds, response curves, binned calibration, and clinic random-intercept modes.

Clustered binary response with a GLMM
07 · Canonical dosing events

Event semantics · provenance · 3 figures

Canonicalize dosing and observation records, resolve same-time order, expand ADDL and infusion stops, and audit every generated row.

Canonical pharmacometrics event semantics
08 · Closed-form PK and ODEs

PK/ODE simulation · sensitivities · 4 figures

Cross-check an IV-bolus ODE against closed form, compare administration routes, and decompose combined residual-error variance.

Closed-form pharmacokinetics and event-aware ODE simulation
09 · Pharmacometric DSL and ModelIR

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.

Pharmacometric declarations and the shared ModelIR
10 · Diagnostics and evidence lifecycle

LMM · simulation · archives/interchange · 3 figures

Move from fit to residuals, VPC, reproducible simulation, integrity-checked archives, validation bundles, and conservative compatibility reports.

Diagnostics, simulation, validation evidence, interchange, and archives

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.