Statistical_Rethinking_with_brms_ggplot2_and_the_tidyverse_2_ed
Statistical_Rethinking_with_brms_ggplot2_and_the_tidyverse_2_ed copied to clipboard
dplyr::lag()
In Section 2.2.2, make sure you use the n
argument within lag()
. The current code uses k
, as if you were using the lag()
function from the stats package. You, however, are using dplyr::lag()
, which uses n
, instead.
Credit @JFern83, who alerted me in a Twitter DM, for the catch