30.12 Monte Carlo precision and replicate planning
SSE power is a binomial proportion estimated from a finite number R of evaluable replicates. Its approximate Monte Carlo standard error is sqrt[p(1−p)/R]. A rough 95% half-width is 1.96 times that value, although Wilson intervals are better near zero, one, or small R. Replication controls numerical uncertainty in the estimate; it does not change the true power of the design.
Concepts to keep separate
- At p=0.80, 100 evaluable replicates give MC SE 0.040 and an approximate 95% half-width 0.078.
- At p=0.80, 1,000 replicates give MC SE 0.0126 and approximate half-width 0.0248.
- To target half-width h, a planning approximation is R ≥ z^2 p(1−p)/h^2; use p=0.5 for the conservative maximum variance.
- Replicate planning must allow for failures because the evaluable denominator may be smaller than attempted R.
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
The executed N=40 estimate was 0.85 from 20 trials with Wilson interval 0.640–0.948 and MC SE 0.0798. Even though 0.85 exceeds the 0.80 target, the interval demonstrates that the run cannot distinguish nearby designs reliably.
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
Choose a Monte Carlo precision tied to the decision. Screening may tolerate a wide interval; choosing between designs near the threshold needs substantially more replication and often sequential expansion around promising N values.
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
- Was R justified before the run?
- Are Wilson intervals and MC SE reported?
- Is R based on attempted or evaluable trials?
- Can borderline scenarios be expanded without changing settings?
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
- Treating the point estimate as exact
- Comparing 0.80 and 0.82 from 20 replicates
- Using normal intervals that extend outside zero to one
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.