06-02 · Power assumptions and model formulae

Consolidate power analysis and prepare a model map for Unit 7.

Workload and timing

For the 7 October class, the week 42 revision and project-scoping task replaces this separate 60-minute assignment. It includes Unit 6 consolidation and is capped at 2½ hours per student. This worksheet remains available as optional further practice: 25 minutes with the recording/deck, 20 minutes investigating supplied results, and 15 minutes preparing your model map. Week 7 is 21 October, after autumn break; there is no class on 14 October.

Use the after-class consolidation deck. If no recording is available yet, read its slides and speaker notes as the same guided sequence. No textbook is required. The reference CSV files and your group curve are included; extensive computation is optional.

Open the instructor-supplied Posit Cloud project for 06-power-analysis. Its scripts, data and reference files are already provided; open your assigned script there.

1. Consolidation — 25 minutes

The three recording chapters are:

  1. Conditional power and relevant effects, 8 minutes: scientific effect, baseline and variation; what rejection does and does not tell us.
  2. Reliability and simulation uncertainty, 9 minutes: null checks, unresolved fits, Monte Carlo intervals and overdispersed counts.
  3. Precision and model formulae, 8 minutes: a different success event and the design-to-model map for Week 7.

Pause at the questions and answer before advancing to the answer slide. More simulation reduces numerical noise; it does not validate biological assumptions or repair an inappropriate analysis.

2. Revisit the recommendation — 10 minutes

Open reference/power-summary.csv, retaining your group and null == FALSE. Compare Baseline and Sensitivity with your class results and your in-class prediction. This comparison is the deferred sensitivity exercise; supplied results are sufficient. The required 10-minute version is already included in the week 42 revision block. Rerunning the optional sensitivity code is not required.

  1. Report the estimated detection probability, Monte Carlo interval and unresolved proportion at your proposed size. If no size is adequate, record that conclusion.
  2. Does the original recommendation survive the sensitivity change?
  3. Which is more important here: simulation noise or uncertainty about the assumptions? Give numerical evidence, while remembering that only two scenarios were investigated.
  4. Rewrite the recommendation in four sentences including a next step to improve evidence about one assumption.

3. Overdispersion and null checks — 10 minutes

All groups inspect the count example. reference/overdispersion-summary.csv uses negative-binomial responses with the same means and size 1.5, but retains the Poisson analysis. It is a deliberately mismatched model. Its conditional variance is mu + mu^2/1.5, exceeding the Poisson variance mu.

Compare it with Group 3 Baseline in reference/power-summary.csv, at 64 total pens, for both null == TRUE and null == FALSE.

  • Record the four detection proportions and intervals.
  • Under the null, what should a well-calibrated 5% procedure approximately achieve?
  • Can a higher rejection rate under a nonzero effect be called better power when the null rejection rate is inflated?
  • What must be revised before making a defensible recommendation?

A useful next analysis must accommodate the extra variation and be checked under both null and alternative. Simply increasing simulations does not fix model mismatch. You do not need to fit a negative-binomial model for this task.

4. Week 7 model map — 15 minutes

Annotate response ~ diet + room for your group’s scientific question. Explain each part and state the family and link. Include:

  1. What is one row and the experimental unit?
  2. What do diet and room contribute to the expected response?
  3. What is the reference diet and reference room in the fitted model?
  4. Why do we keep room when testing diet?
  5. What does the fitted intercept estimate for the control diet in Room 1, and why can its estimate differ from the assumed value?

Use the illustrative fitted coefficient below (these are interpretation examples, not reference simulation output):

Group Illustrative fitted diet coefficient Interpretation task
1 40 Translate into expected gain difference
2 -0.50 Translate to odds ratio and predict high-fibre probability if the control probability is 0.30
3 -0.40 Translate to expected-count ratio and high-fibre mean if control mean is 3
4 -0.08 Translate to expected FCR ratio and high-fibre mean if control mean is 2.80

Finally, state which predictor values are needed to obtain a fitted mean for a new pen. Explain whether pen ID is needed. Bring one unresolved question to Week 7.

What to retain

Save the revised recommendation, four overdispersion numbers with your explanation, and one-page model map. These are the basis for Week 7 retrieval; no extra pre-class lecture is assigned.

Optional depth

Precision: inspect reference/precision-summary.csv. For Gaussian gain, compare detection with the probability that the 95% t interval has total width at most 60 g/day. This width is an illustrative planning threshold. Explain why precision success and hypothesis rejection are different events.

Allocation: describe how rerandomising diets within rooms for each repetition changes the target from performance conditional on one allocation to performance averaged over the allocation mechanism. No coding is required.