Fixed- and random-effect predictor
In the previous exercises, you fit mixed-effect models with different fixed- and random-effects.
Sometimes, a model can have the same predictor as both a fixed and random-effect. For example, perhaps you are interested in estimating the average effect the age of a mother at birth (AverageAgeofMother). Including the predictor as fixed-effect allows you to estimate the effect of a mother's age across all locations. Including the predictor as a random-effect allows you to simultaneously account (or correct) for different slope estimates among states.
Este ejercicio forma parte del curso
Hierarchical and Mixed Effects Models in R
Instrucciones del ejercicio
- Construct a 
lmer()usingAverageAgeofMotheras a fixed-effect andAverageAgeofMotheras a random-effect nested withinStateto predictBirthRatewith thecounty_births_data. Make sure the fixed-effect goes before the random-effects in the formula. - Use 
summary()on the output. 
Ejercicio interactivo práctico
Prueba este ejercicio y completa el código de muestra.
# Construct a lmer() 
out <- lmer(___)
# Look at the summary
summary(___)