# Synthetic calf-growth data

**Synthetic teaching fixture, not observations from real animals.** Exact copy of Week 10's CSV; no observations were added, selected or relabelled. There are 32 individually housed calves receiving Control or Enhanced feeding, randomised within four fixed room blocks (eight calves per room, four per diet). Each calf has complete weight measurements at 0, 2, 4, 6 and 8 weeks; time 0 is before feeding begins. There are 16 independent diet allocations per diet and 160 observational records.

| Column | Meaning |
|---|---|
| room | Fixed block R1–R4 |
| calf | Globally unique calf ID C01–C32; treatment unit |
| diet | Control or Enhanced |
| time_week | Weeks since allocation; time 0 measurement precedes feeding |
| weight_kg | Body weight in kg |

Teaching data generating process, fixed seed 104601: expected weight = 40 kg + room offset + 5.6*time_week − 0.12*time_week² + 0.45*time_week*I(Enhanced), plus independent zero-mean calf deviation SD 5 kg and stationary Gaussian measurement errors SD 2 kg with AR(1) rho 0.5 per two-week visit. Room offsets are −2, 0, 1 and 2 kg. Errors from distinct calves are independent. Weights are rounded to three decimals. No seed was selected for a favourable model or contrast.

The generating diet difference is zero at time 0 and increases by 0.45 kg per week; the fitted model does not constrain the time-0 diet difference to zero, allowing chance imbalance. The linear and curved mean fits deliberately share the same provisional calf-intercept covariance. The curved model still needs a check of remaining serial dependence. Supplied optional AR(1) illustrates one defensible covariance extension. Real animal trajectories may have different shapes, slopes, heterogeneity and missingness.

The student script creates `week = time_week` for readable formulae and a `visit` factor with levels `0, 2, 4, 6, 8` for the optional equally spaced visit model. Neither is a new measurement. Retain time_week in exported data.
