Session Ready
Exercise

Including a fixed effect

During the previous exercise, you built a model with only a global intercept. Usually, hierarchical models include predictor variables of interest.

The county-level birth data includes the average age of the mother, AverageAgeofMother. Perhaps this explains a county's birth rate.

In this case, the formula in R "knows" AverageAgeofMother is numeric and will treat the corresponding coefficient as a slope.

Build a hierarchical model with countyBirthsData, which has been loaded for you, and include a fixed-effect. Does the average age of the mother at birth predict the birth rate?

Instructions 1/2
undefined XP
  • 1
  • 2
  • Build a model with AverageAgeofMother as a fixed-effect slope parameter including State as a random-effect. The response variable is BirthRate.
  • Examine the model's summary().