Chlamydia by age-group and county
The number of infections change through time and vary across age groups. Some possible reasons cultural, social, and policy-related factors. For small populations, the number of infections often includes zeros and may be non-normal. For data such as these, use a Poisson model.
For this exercise, you will examine how chlamydia infections vary in small, Illinois counties. You will ask:
- Do the number of reported cases vary between people aged 15-19 compared to 20-24?
- Are the number of reported cases changing across time for these two age group?
This data comes from the State of Illinois who provides summaries of infections such as chlamydia by age groups and counties.
First, fit a Poisson glmer
to the data.
Then, examine the results.
In the next exercise, plot the data.
Warning: If you mistype the formula, you may cause R to crash. This is a pitfall of using lmer()
and glmer()
.
This exercise is part of the course
Hierarchical and Mixed Effects Models in R
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Load lmerTest
library(lmerTest)
# Age goes before year
model_out <- ___
summary(___)