-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy path_exr-prac-glm-interp.qmd
More file actions
69 lines (46 loc) · 1.46 KB
/
Copy path_exr-prac-glm-interp.qmd
File metadata and controls
69 lines (46 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
{{< include latex-macros/macros.qmd >}}
::: {#exr-prac-glm-interp}
#### Interpreting Poisson regression coefficients
(adapted from @dunn2018generalized, Chapter 5, and @dobson4e, Chapter 9)
Consider a Poisson log-linear model for the expected number of events $\mu_i$:
$$
\logf{\mu_i} = \beta_0 + \beta_1 x_i,
$$
where $x_i$ is a binary indicator ($x_i = 0$ or $x_i = 1$).
**(a)** Express $\mu_i$ as a function of $x_i$.
**(b)** Interpret $\exp{\beta_0}$.
**(c)** Interpret $\exp{\beta_1}$.
**(d)** If $\eb_0 = 1.2$ and $\eb_1 = 0.5$,
compute the estimated mean event count for $x_i = 0$ and $x_i = 1$.
:::
::: {.solution}
**(a)**
$$
\mu_i = \exp{\beta_0 + \beta_1 x_i} = \exp{\beta_0} \cdot (\exp{\beta_1})^{x_i}
$$
For $x_i = 0$: $\mu_0 = \exp{\beta_0}$.
For $x_i = 1$: $\mu_1 = \exp{\beta_0 + \beta_1}$.
**(b)**
$\exp{\beta_0}$ is the expected mean count when $x_i = 0$ (the reference group).
**(c)**
$$
\exp{\beta_1}
= \frac{\mu_1}{\mu_0}
= \frac{\exp{\beta_0+\beta_1}}{\exp{\beta_0}}
$$
$\exp{\beta_1}$ is the **rate ratio** (or count ratio):
the multiplicative factor by which the expected count changes
when $x_i$ increases from 0 to 1.
If $\beta_1 > 0$, the group with $x_i = 1$ has a higher expected count.
**(d)**
For $x_i = 0$:
$$
\emu_0 = \exp{1.2} \approx 3.32
$$
For $x_i = 1$:
$$
\emu_1 = \exp{1.2 + 0.5} = \exp{1.7} \approx 5.47
$$
The estimated rate ratio is $\exp{0.5} \approx 1.65$,
meaning the group with $x_i = 1$ has about 65% more events on average.
:::