Skip to content

Commit 364df60

Browse files
docs(count-regression): address review findings and refine math derivations
Address all review findings and refine math derivations in count regression: - Fix log-likelihood macro in test description to \est{\llik}_1 and \est{\llik}_0. - Update Poisson predictions subfile _sec_pois-reg-preds.qmd using \est{\eta}(\vx) and remove orphan file _sec_pois-reg_preds.qmd. - Add observation subscript i consistency across residuals in _sec_poisson_dx.qmd. - Standardize transpose macro \tp{(X_1, \dots, X_p)} and refine linear predictor substitution annotation in _sec_pois-reg_intro.qmd. Co-authored-by: dem-extra1 <112029334+dem-extra1@users.noreply.github.com>
1 parent 9ac1a8b commit 364df60

5 files changed

Lines changed: 17 additions & 28 deletions

File tree

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
21
$$
3-
\begin{aligned}
4-
\hat y
5-
&\eqdef \hat{\Expp}[Y|\vX= \vx,T=t]\\
6-
&=\hat\mu(\vx, t)\\
7-
&=\hat\lambda(\vx) \cdot t\\
8-
&=\exp{\hat\eta(\vx)} \cdot t\\
9-
&=\exp{\vx'\hat{\vec{\beta}}} \cdot t
10-
\end{aligned}
2+
\ba
3+
\ey
4+
&\eqdef \eExp{}[Y \mid \vX = \vx, T = t] && \text{(definition of estimated conditional expectation)} \\
5+
&= \emu(\vx, t) && \text{(estimated mean count function)} \\
6+
&= \el(\vx) \cdot t && \text{(substituting estimated event rate relation } \emu(\vx, t) = \el(\vx) \cdot t\text{)} \\
7+
&= \exp{\est{\eta}(\vx)} \cdot t && \text{(substituting inverse link function } \el(\vx) = \exp{\est{\eta}(\vx)}\text{)} \\
8+
&= \exp{\eb_0 + \eb_1 x_1 + \dots + \eb_p x_p} \cdot t && \text{(substituting estimated linear predictor } \est{\eta}(\vx)\text{)}
9+
\ea
1110
$$

_subfiles/count-regression/_sec_pois-reg_intro.qmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This chapter presents models for
66
With covariates,
77
the event rate $\lambda$
88
becomes a function of the covariate vector
9-
$\vX = (X_1, \dots, X_p)\' \in \reals^p$.
9+
$\vX = \tp{(X_1, \dots, X_p)} \in \reals^p$.
1010
Typically, count data models use
1111
a $\logf{}$ link function,
1212
and thus an $\exp{}$ inverse-link function.
@@ -61,7 +61,7 @@ $$
6161
&= \logf{\lambda(\vx)} + \log{t} && \text{(by logarithmic product rule } \logf{a \cdot b} = \logf{a} + \log{b}\text{)} \\
6262
&= \logf{\exp{\eta(\vx)}} + \log{t} && \text{(substituting rate function } \lambda(\vx) = \exp{\eta(\vx)}\text{)} \\
6363
&= \eta(\vx) + \log{t} && \text{(by inverse relationship of log and exp)} \\
64-
&= (\beta_0 + \beta_1 x_1 + \dots + \beta_p x_p) + \log{t} && \text{(substituting linear predictor } \eta(\vx)\text{)}
64+
&= (\beta_0 + \beta_1 x_1 + \dots + \beta_p x_p) + \log{t} && \text{(substituting linear predictor } \eta(\vx) = \beta_0 + \beta_1 x_1 + \dots + \beta_p x_p\text{)}
6565
\ea
6666
$$
6767

_subfiles/count-regression/_sec_pois-reg_preds.qmd

Lines changed: 0 additions & 10 deletions
This file was deleted.

_subfiles/count-regression/_sec_poisson_dx.qmd

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@
22

33
#### Observation residuals
44

5-
$$e \eqdef y - \ey$$
5+
$$e_i \eqdef y_i - \ey_i$$
66

77
#### Pearson residuals
88

9-
$$r \eqdef \frac{e}{\hse{e}} \approx \frac{e}{\sqrt{\ey}}$$
9+
$$r_i \eqdef \frac{e_i}{\hse{e_i}} \approx \frac{e_i}{\sqrt{\ey_i}}$$
1010

1111
#### Standardized Pearson residuals
1212

13-
$$r_p \eqdef \frac{r}{\sqrt{1-h}}$$
14-
where $h$ is the leverage value for observation $i$.
13+
$$r_{p,i} \eqdef \frac{r_i}{\sqrt{1-h_i}}$$
14+
where $h_i$ is the leverage value for observation $i$.
1515

1616
#### Deviance residuals
1717

1818
$$
1919
d_i \eqdef \signt(y_i - \ey_i)
20-
\sqrt{2\sb{\llik_{\text{full}}(y_i) - \llik(\eb \mid y_i)}}
20+
\sqrt{2\sb{\llik_{\text{full}}(y_i) - \llik(\eb; y_i)}}
2121
$$
2222

2323
:::{.callout-note}

_subfiles/count-regression/_sec_poisson_inference.qmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ To compare a smaller model $M_0$ (with $p_0$ parameters) to a larger model
4040
$M_1$ (with $p_1 > p_0$ parameters), use the likelihood ratio test statistic:
4141

4242
$$
43-
G^2 = 2\bigl[\el_1 - \el_0\bigr]
43+
G^2 = 2\bigl[\est{\llik}_1 - \est{\llik}_0\bigr]
4444
$$
4545

46-
where $\el_1$ and $\el_0$ are the maximized log-likelihoods
46+
where $\est{\llik}_1$ and $\est{\llik}_0$ are the maximized log-likelihoods
4747
of $M_1$ and $M_0$ respectively.
4848
(Here the model subscripts $0$ and $1$ index $M_0$ and $M_1$;
4949
they are distinct from the null parameter value $\beta_{j,0}$ used in the Wald test.)

0 commit comments

Comments
 (0)