From cb695729906cf7822fe38fa93e5be25055430dc4 Mon Sep 17 00:00:00 2001 From: Raffaele Mancuso Date: Sat, 12 Jul 2025 08:34:36 +0200 Subject: [PATCH] Specify what ranef and coef shows --- random_intercepts.Rmd | 3 +++ 1 file changed, 3 insertions(+) diff --git a/random_intercepts.Rmd b/random_intercepts.Rmd index 05d614b..ba3536f 100644 --- a/random_intercepts.Rmd +++ b/random_intercepts.Rmd @@ -326,6 +326,8 @@ extract_random_effects(gpa_mixed) %>% kable_df(align = 'r') ``` +This shows the deviation of each student from the "grand intercept", that is, what we called $\mathrm{effect}_{\mathrm{student}}$. + ```{r randints, eval=FALSE} coef(gpa_mixed)$student %>% head(5) ``` @@ -336,6 +338,7 @@ extract_random_coefs(gpa_mixed) %>% kable_df(align = 'rr') ``` +This shows the overall intercept for each student, that is, what we called $b_{\mathrm{int\_student}}$. Note that we did not allow occasion to vary, so it is a constant, i.e. *fixed*, effect for all students.