Statistical_Rethinking_with_brms_ggplot2_and_the_tidyverse_2_ed
Statistical_Rethinking_with_brms_ggplot2_and_the_tidyverse_2_ed copied to clipboard
residuals and history
McElreath is a little inconsistent with how he talks about residuals. The typical definition of residuals now a days is
$$r_i = y_i - \hat y_i,$$
but in McCullagh & Nelder (1989, p. 9), we read "Gauss defined he residuals with opposite sign to that in current use, i.e. by $X \beta - y$," which we might express in the notation above as
$$r_{i \text{, old}} = \hat y_i - y_i.$$
In chapters 5 through 7 or so, McElreath seems to use both. For example, on page 135, we read:
And then we compute the residuals by subtracting the observed marriage rate in each State from the predicted rate, based upon the model above (emphasis added)
But his plot on page 136 seems to use the conventional modern definition of residuals. Consider specifically defining residuals in chapter 5 of the ebook, referencing McCullagh & Nelder (1989, p. 9), and commenting on McElreath's usage. Note this issue also comes up with the R2_is_bad()
function in chapter 7.
- McCullagh & Nelder: https://www.routledge.com/Generalized-Linear-Models/McCullagh-Nelder/p/book/9780412317606