Session Ready
Exercise

Displaying the results

The last, and arguably most important, is the step of creating a model is sharing the results.

During this exercise, you'll extract out the county-level estimates and plot them with ggplot2. The county-level random-effect slopes need to be added to the fixed-effect slopes to get the slope estimates for each county.

In addition to this addition, the code includes ordering the counties by rate of crime (the slope estimates) to help visualize the data clearly.

The model you previously fit, glmer_out has been loaded for you.

Instructions 1/2
undefined XP
  • 1
  • 2
  • Extract and save the Year2 slope estimates as Year2_slope.
  • Extract out the County-level random-effects.
  • Create a new column for the slope by adding together fixed- and random-effect slopes.