https://classroom.github.com/a/Jl551RUZ

**Due: 2020-05-08 by 11:59pm**

Use the dataset hospital, which records various measurements about hospitals, sometimes collapsing a number of measurements about each hospitals’ patients into one observation for that hospital; README.

Use `infection_risk`

as your numeric response variable. Infection risk is an index, not a percentage, not a probability. It’s a unitless representation of risk, in which higher numbers imply a greater risk, and lower numbers imply a lesser risk.

Use `region`

as a categorical explanatory variable. Be careful with the type of region as region corresponds to distinct regions of the US, but is encoded numerically.

Further, pick 1 numerical explanatory variable that you think will help explain infection risk. Use these three variables throughout.

Means by region.

Make transparent box plots with your response variable on the y-axis and the categorical variable on the x-axis.

Write a complete English sentence about the plot in the context of the data.

Simple Linear Regression.

Make a scatter plot of your two numerical variables, and put a line through the data using

`geom_smooth(...)`

.Write a complete English sentence about the plot in the context of the data.

Unique intercepts by region.

Fit a multiple linear regression model with unique intercepts by levels of the categorical explanatory variable region.

Make a scatter plot with lines through the data matching your model.

Write a complete English sentence about the plot/modelin the context of the data.

Unique slopes by region.

Fit a multiple linear regression model with unique slopes, and only one intercept, by levels of the categorical explanatory variable region.

Which region has the largest (in absolute value) slope?

What does the largest slope indicate about that region? Interpret largest slope in context of the data.

Unique intercepts and slopes by region.

Fit a multiple linear regression model with unique intercepts and slopes by levels of the categorical explanatory variable region.

Interpret the intercept for region 2 in context of the data. If the interpretation does not make sense, explain why.

Interpret the slope, not just the slope offset, for region 4 in context of the data. You’ll need to do some quick math to determine the appropriate slope for region 4.

Choose a value within the range of your numerical explanatory variable along the x-axis, call it

`xnew`

. Create bootstrap confidence intervals for predictions at`xnew`

for two different regions.Interpret your two confidence intervals in context of the data.

Make an informative conclusion about the hospitals in the two different regions based on your confidence intervals.

Choose a value outside the range of your numerical explanatory variable along the x-axis, call it

`xnew_ex`

. What do we call this, when we predict outside the range of our data?Make a prediction at

`xnew_ex`

and interpret it context of the data. Does your prediction make sense? Why or why not?