41.34 Case 7: power by simulation and estimation, and what the formula missed
What you will learn
- Explain what a simulation–estimation (SSE) replicate is, and compute the power and its interval from replicate counts.
- Check the formula of the previous page against simulation, and say which information matrix the simulation supports.
- Read non-monotone power across sample sizes as Monte Carlo noise, using the interval.
- Separate power from precision, and see why a powered design can fail its criteria.
- Resume an interrupted SSE run, and know what four replicates of a type-I check are worth.
Prerequisites: 41.33 and Chapter 30, simulation–estimation.
The question: the formula said 44 subjects (reduced information) or 9 (full). Which should be believed, and how many subjects does a run of the actual estimator need?
The evidence: Chapter 30 bundle sse_smoke, and Chapter 31 bundles both_screen_confirm, sse_uncertainty_type1 and theta_nonzero_null. All simulate from the base model of preset_analytic with a weight effect on clearance of 0.75.
What one replicate is
An SSE replicate is a small complete study. The program (1) generates a data set of N subjects from the truth, (2) fits the model without the tested effect and the model with it, and (3) applies the test, here the likelihood-ratio test at the 5 % level (--test-statistic lrt). Power is the share of replicates in which the test rejects. The stored table gives it over all trials and over converged fits only; in every run on this page all replicates converged, so the two coincide. The interval is a Wilson interval on that share:
Twenty replicates
nlmx power run101.ctl --ext run101.ext --method sse --sample-sizes 40,80 \
--test "CL~WT=0.75" --replicates 20 --test-statistic lrt \
--no-cov-step --fit-start reference --target-power 0.8 --seed 30002 --threads 4
--no-cov-step skips the covariance step of every fit (the tests need no standard errors, and it saves time); --fit-start reference starts every fit from the reference estimates. The whole run took 54 seconds.
| N | Rejections | Power | 95 % interval | Median ΔOFV | Convergence |
|---|---|---|---|---|---|
| 40 | 17 of 20 | 0.850 | 0.640–0.948 | 8.64 | 100 % |
| 80 | 20 of 20 | 1.000 | 0.839–1.000 | 15.04 | 100 % |
The interval at 17 of 20 is 0.640–0.948 (the formula above gives exactly that), which is wide: twenty replicates cannot separate a true power of 0.65 from 0.95.
Which matrix does the simulation support?
| N | Reduced FIM | Full FIM | SSE (95 % interval) |
|---|---|---|---|
| 40 | 0.769 | 1.000 | 0.850 (0.640–0.948) |
| 80 | 0.968 | 1.000 | 1.000 (0.839–1.000) |
At 40 subjects the reduced matrix (0.769) sits inside the simulation's interval and the full matrix (1.000) is above its upper limit. The simulation therefore contradicts the full matrix, which promised nearly certain detection with 40 subjects, and is consistent with the reduced one. At 80 subjects both are consistent, so the data cannot choose. This is the check that the previous page asked for, and it is the reason the planning rule is reduced matrix, then simulation: the full matrix would have recommended a study of nine subjects.
A second, independent check uses the likelihood-ratio statistic itself. With one degree of freedom its median under the alternative is close to the non-centrality that the reduced information predicts (7.27 at 40 subjects and 14.55 at 80). The simulated medians are 8.64 and 15.04. The agreement is within the noise that 20 replicates give, and it is a direct comparison of the formula's statistic, not only its power.
Three sample sizes, twelve replicates
The both_screen_confirm bundle runs --method both: the formula as a screen and the simulation as a confirmation, at 30, 45 and 60 subjects with 12 replicates each (21 seconds).
| N | FIM, reduced | SSE: rejections | SSE power | 95 % interval |
|---|---|---|---|---|
| 30 | 0.646 | 9 of 12 | 0.750 | 0.468–0.911 |
| 45 | 0.816 | 7 of 12 | 0.583 | 0.320–0.807 |
| 60 | 0.910 | 11 of 12 | 0.917 | 0.646–0.985 |
The middle row is the lesson of the table: power falls from 0.750 to 0.583 when the sample grows from 30 to 45 subjects. Power cannot fall with more subjects; the true curve is increasing. The two intervals overlap almost entirely (0.468–0.911 and 0.320–0.807). The formula's values at 30 and 60 subjects (0.646 and 0.910) lie inside their intervals, and at 45 subjects its 0.816 is just above the upper limit of 0.807: one miss among three 95 % intervals is about what chance allows, and the sample-size check of the previous section, at 40 subjects, had none. Non-monotone power in a small SSE is noise, and the interval is what says so. A reader who took the 0.583 at face value would conclude that 45 subjects are less informative than 30.
The sample size for 80 % power is read from the SSE points by interpolation between the simulated sizes, 54.75 (rounded to 55), against 43.16 → 44 from the formula. The formula's value lies below the SSE's, and the data cannot tell whether that is a real difference between them or twelve replicates at three sizes.
| Method | N for 80 % power | Precision of the number |
|---|---|---|
| FIM, reduced | 44 | exact, given the approximation |
| SSE, 12 replicates per size | 55 | the intervals at the three sizes span 0.3–0.99 |
Reporting both, with the reason for the choice, is the right form. A design that must guarantee 80 % power would use the larger number or run more replicates.
Power is not precision
The third bundle, sse_uncertainty_type1, adds three things: --uncertainty (each replicate draws its truth from the fit's covariance), --type1-replicates 4 (replicates simulated without the effect, to estimate the false-positive rate), and --test-statistic both (the likelihood-ratio and the Wald test on the same fits). It runs 6 replicates at N = 40.
| Quantity | Value |
|---|---|
| Power, likelihood-ratio test | 0.833 (5 of 6), interval 0.436–0.970 |
| Power, Wald test | 1.000 (6 of 6) |
| Type-I error | 0 (of 4 replicates) |
| Median ΔOFV | 7.38 |
| Convergence | 6 of 6 |
The program reports the target as met (power 0.833 ≥ 0.8), and also reports all_criteria_met = no. The reason is in the per-parameter table. For the tested effect in the six replicates:
| Parameter | Truth | Mean estimate | Median bias | Mean RSE | Replicates with RSE ≤ 30 % |
|---|---|---|---|---|---|
| CL ~ WT | 0.75 | 0.781 | −7.3 % | 36.4 % | 1 of 6 |
| additive error | 0.0241 | 0.0235 | 0.9 % | 45.8 % | 50 % |
| every other parameter | within ±11 % | 3.8–23.9 % | all |
Two things are worth taking from it.
- The design is powered and imprecise. The effect is detected in five or six replicates out of six, yet its mean relative standard error (36.4 %) is above the limit of 30 % in five of six replicates. Power is about a difference from zero; the criteria also ask how well the size of the effect is known. The formula had predicted it: the reduced matrix gives an SE of 0.278 at 40 subjects, an RSE of 0.278/0.75 = 37.1 %, against 36.4 % in the simulation. The two methods agree on the precision too.
- The additive error is again the weakest parameter (the one page 41.33 flagged), and here half the replicates missed the 30 % limit.
Two things four replicates cannot do
The false-positive rate is 0 of 4. With four replicates the upper 95 % limit of a zero is 3.84/(4 + 3.84) = 0.49, so the bundle shows the mechanism of the type-I run and nothing about the rate. And the power of two tests on six replicates differs by exactly one replicate (5 against 6), which is not a difference between the tests.
Resuming
The run was executed with --resume, and two transcripts are stored. The second reads resuming: 10 replicate(s) found in sse_replicates.jsonl: the six power replicates and the four type-I replicates written by the first run, so the second run found nothing left to simulate (0 s) and wrote its summary from the stored replicates. A long SSE run is interrupted by the machine, not by the science, and the replicate file is the checkpoint; Chapter 42 (page 42.13) lists the test that proves a resumed run equals an uninterrupted one.
A different kind of test: a parameter against a non-zero null
The theta_nonzero_null bundle tests the absorption rate against a non-zero null, --test "THETA(3)=1.4;null=1.1;name=KA above 1.1": is the true absorption rate (1.4) different from a reference of 1.1? Eight replicates at 40 and 80 subjects reject the null in all (8 of 8, interval 0.676–1.000). The formula says 12 subjects are enough. The simulation's interval is too wide to disagree, and agrees in the only way eight replicates can: by not contradicting it. The page that follows from it is the same as above: a sample size is a number with a method and a precision beside it.
The decision
| Question | Evidence | Decision | Reversible? |
|---|---|---|---|
| Which information matrix to plan with? | SSE at N = 40: 0.85 (0.64–0.95) vs full 1.00, reduced 0.77 | reduced | yes |
| How many subjects? | FIM 44; SSE 55 by interpolation, 12 replicates | 55 if 80 % must be assured; 44 is the optimistic planning value | no once enrolled |
| Is a powered design adequate? | power 0.833, RSE 36.4 % > 30 % | not on precision; decide whether the effect's size must be known, or only its existence | no |
| Is the false-positive rate known? | 0 of 4 replicates | no; run the type-I replicates in the hundreds | yes |
What this case does not show
All runs have 6 to 20 replicates, so every power carries an interval of 0.3 or more. They are demonstrations of the method and of how to read it, not a power analysis for a study. The runs use one model, one effect and one test, and do not combine the dropout and schedule effects of the grid on the previous page. The base model's truth is the fitted value of the shared example, and a different truth would give a different answer.
Review checklist
- Do you report an SSE power with its interval and its number of replicates?
- When power is not monotone in N, do you check the intervals before looking for a cause?
- Do you compare the formula with the simulation at the same sample size, and say which one the data support?
- Do you read the precision criteria as well as the power, and decide which one drives the sample size?
- Is an interrupted run resumed from its checkpoint rather than restarted?
Navigation
See the previous page, the next page and the complete case-study reference.