---
# System prepended metadata

title: Linear models and difference from baseline

---

# Linear models and difference from baseline

$$
y_{post} - y_{pre} \sim N(d, \sigma) \\
H_0: d = 0
$$

An equivalent model

$$
y_{post} \sim N(d + y_{pre}, \sigma) \\
$$

gen:

$$
y_{post} \sim N(d + \beta y_{pre}, \sigma)
$$

```
lm(post ~ 1 + pre)
```

```
lm(post ~ 1 + pre + displacement)
```