30.9 Simulation truth and random variation
Simulation truth contains fixed effects, variance components, residual-error parameters, covariate coefficients, and trial mechanisms. Between replicates, random effects, residual errors, resampled subjects, missingness, and other stochastic events vary. A fixed-truth study holds the parameter vector constant; an uncertainty study redraws the parameter vector as well.
Concepts to keep separate
- Distinguish reference estimates from generating truth. Reference estimates become truth only because the design protocol declares them so.
- Retain the truth vector for each replicate, especially when parameter uncertainty is enabled.
- Admissibility constraints matter: variances must remain valid, covariance matrices positive semidefinite, and structural parameters within meaningful ranges.
- Random streams should be derived from seed, scenario, and replicate identifiers so thread scheduling cannot change results.
Terminology matters because a single scenario can contain several denominators and several sources of randomness. Truth is the parameter vector used to generate a replicate. Estimate is the value recovered from that replicate. Design is the planned arrangement of subjects, arms, doses, and observations. Method is the approximation or simulation–estimation procedure used to predict performance. A credible report labels all four.
Mathematical or operational walkthrough
When CL~WT is set to 0.75, that value is the generating coefficient even though each fitted estimate differs. Bias uses estimate minus the replicate-specific truth, not estimate minus the average reference value under uncertainty.
For novices, read every expression from the inside out: identify the scientific effect, identify the null value, put both on the same parameter scale, identify the variance or information that belongs to the actual design, and only then calculate a test statistic or sample size. Units and parameterisation should cancel in a way that leaves a dimensionless statistic.
How this maps to nlmx
A realistic truth distribution must preserve parameter correlation. Independently perturbing correlated clearance and volume parameters can create biologically implausible combinations and misleading assurance.
Chapter 30 explains the statistical and implementation concepts. Chapter 31 gives the complete nlmx power command, every CLI and settings control, precedence, output schema, and production workflow. This separation is deliberate: choosing an option correctly requires understanding which estimand and assumption it changes.
Quality-control checklist
- Is every stochastic layer documented?
- Are parameter draws admissible and correlated?
- Does changing threads preserve the same replicate outcomes?
- Is replicate-specific truth present in row-level evidence?
The graph is explanatory; the CSV, JSON, resolved settings, model inputs, and replicate rows are the authoritative evidence. When a plotted point looks surprising, diagnose the underlying rows before changing the design.
Common mistakes
- Calling a fitted estimate known truth
- Perturbing variances onto invalid values
- Using one undifferentiated random stream for all scenarios
Also avoid copying a sample size from a nearby project. Power is conditional on the model, tested effect, covariate distribution, schedule, residual and random variability, attrition, test, estimator, and success criteria. Similar-looking studies can have very different information.
Evidence to retain
- scientific question, estimand, hypothesis, alpha, target, and criteria;
- model/data/design inputs, parameter source and uncertainty distribution;
- software version, method, approximation, seed, threads, command, and resolved settings;
- scenario grid, row-level results, failures, denominators, intervals, diagnostics, and checksums;
- scripts that calculate derived tables and figures, plus the interpretation and limitations.
Navigation
See the previous page, next page, and formula and decision index.