शुरू करेंमुफ़्त में शुरू करें

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 county_births_data, which has been loaded for you, and include a fixed-effect. Does the average age of the mother at birth predict the birth rate?

यह अभ्यास पाठ्यक्रम का हिस्सा है

Hierarchical and Mixed Effects Models in R

पाठ्यक्रम देखें

इंटरैक्टिव व्यावहारिक अभ्यास

इस अभ्यास को इस नमूना कोड को पूरा करके आज़माएँ।

# Include the AverageAgeofMother as a fixed effect within the lmer and state as a random effect
age_mother_model <- lmer(___ ~ ___ + (1 | ___),
                       county_births_data)
summary(age_mother_model)
कोड संपादित करें और चलाएँ