Lab 10
Overview and data preparation
The city of Portland, OR wants to investigate variables influencing the number of 911 calls within the city. Thus, you will conduct an ordinary least squares (OLS) regression to help explain the prevalence of emergency calls. First, read the data in R:
library(sf)
calls <- st_read("https://gitlab.com/mhaffner/data/-/raw/master/calls_911.geojson")
Analysis
The
Callsvariable will serve as the dependent variable (DV) in our models. Create a simple map of this variable first (1 point).Next, conduct a ākitchen sinkā linear regression using
Callsas the DV and all other columns of thecalls_911dataset as independent variables (IVs). What is the modelās coefficient of determination (2 points)?Select five variables to use in another regression model. Which variables did you choose, and how did you make your selections (2 points)?
Conduct another regression model using only these variables. What is the coefficient of determination (1 point)?
What is the regression equation of this new model (2 points)?
Assess the following regression assumptions, and explain how the model holds up to each. Supplement your reasoning with graphical methods, maps, and/or test results.
- Limited multicollinearity (1 point)
- Normality of residuals (1 point)
- No spatial autocorrelation in the residuals (2 points)