# Design cards: start with the treatment assignments

Work seated. Identify what was randomised, what is measured repeatedly, and what one row means before choosing a formula.

## A — individually allocated calf feeding

Thirty-two individually housed calves live in four rooms. Within each room, four calves receive each diet. Weights are recorded before feeding, then at weeks 2, 4, 6 and 8. Count animals or pens assigned to each diet. Explain `room + diet * time_factor + (1 | calf)`. What sharing between nearby visits could remain?

## B — diet assigned to a pen

Sixteen pens in four rooms receive diets, two pens per diet in each room. Six animals per pen are weighed five times: 480 rows. IDs are unique across rooms and pens. Draw room → pen → animal → occasion. Count assignments per diet. Explain why allowing only persistent animal differences misses shared pen conditions. A candidate model needs both pen and animal terms; neither adds new diet assignments.

## C — the worked two-period cow crossover

Twenty-four cows are randomly assigned to AB or BA, twelve per order. A and B are rations. Every cow receives each ration for ten days in its assigned order. Mean daily intake over the final three days is one row. A ten-day treatment-free gap is specified; adequacy is a scientific assumption rather than a result from these data.

Draw the two sequences across periods. Explain why both rations must appear in both periods. Count cow assignments and cow-period rows. Explain `intake_kg_day ~ treatment + period + sequence + (1 | cow)`. Fit it using the actual `data/cow-crossover.csv` records in the script.

What justifies the gap? What if the first treatment has a lasting effect? Explain why adding sequence does not remove that effect. Contrast this study with the calves, whose diet never switches.
