Intercepts
Intercepts are an important part of regression models, including hierarchical models, and allow the modeling of discrete groups. Without other coefficients, a single intercept is the global mean of the data. This model is also called a null model by some. Similarly, multiple intercepts allow you to estimate the mean for each group as long as other coefficients are not estimated.
During this exercise, you will learn about intercepts and see their relationship to means.
You will look at a subset of the school data that only includes student data from the school with the id code of 3
.
This data has been loaded for you as school_3_data
.
Cet exercice fait partie du cours
Hierarchical and Mixed Effects Models in R
Exercice interactif pratique
Essayez cet exercice en complétant cet exemple de code.
# Use a linear model to estimate the global intercept
___(___, data = ___)
# Use summarize to calculate the mean
school_3_data %>%
summarize(___(___))