CommencerCommencer gratuitement

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:

  1. Do the number of reported cases vary between people aged 15-19 compared to 20-24?
  2. 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().

Cet exercice fait partie du cours

Hierarchical and Mixed Effects Models in R

Afficher le cours

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

# Load lmerTest
library(lmerTest)

# Age goes before year
model_out <- ___
summary(___)
Modifier et exécuter le code