Exercise

# Displaying the results from a lmer model

Communicating is an important part of data science and DataCamp offers courses on the topic. This is especially true for complex models such as the results from `lmer()`

. A critical part of communication is to match your audience's knowledge level and expectations.

For non-technical audiences, simply describing your outputs may be sufficient. For example, you might say, *counties with older mothers tend to have lower birth rates*. For technical audiences, include the coefficient estimates, confidence intervals, and test statistics. Additionally, formal resources for describing regression outputs exist, such as *The Chicago Guide to Writing about Multivariate Analysis*.

During this exercise, you will extract and plot fixed-effects. This requires some wrangling code, which you are given. Besides plotting the coefficients (with `geom_point()`

) and their 95% confidence intervals (with `geom_linerange()`

), you will add a red-line to the plot to help visualize where zero is located (using `geom_hline()`

). If the 95% confidence intervals do not include zero, the coefficient's estimate differs from zero.

Additionally, `coord_flip()`

is required because `ggplot`

does not allow for `xmin`

or `xmax`

, only `ymin`

and `ymax`

. And, `theme_minimal()`

changes the theme from the default.

**Technical note:** Extracting regression coefficients from `lmer`

is tricky (see the discussion between the `lmer`

and `broom`

authors).

Instructions

**100 XP**

- Extract the coefficients from the model
`out`

using`fixef()`

and`confint()`

and then wrangle the data. - Print the coefficient table to the screen.
- Plot the outputs using
`ggplot2`

. Use`parameter`

for the x-axis,`est`

for the y-axis,`L95`

for the`ymin`

, and`U95`

for the`ymax`

.