Exercise

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().

Instructions 1/3

undefined XP
    1
    2
    3
  • Run a glmer() with a "poisson" family, predicting count as a function of fixed effects age (1st fixed-effect) and year (2nd fixed-effect), and include year as a random-effect grouped by county. Use the data il_data.
  • Look at the summary() of the model.
  • Be careful with the random-effect. If you wrongly specify the random-effect, you may crash R.