We then did a very similar data analysis on the number of nonviolent crimes per $100,000$ people within a community. First, we realized that a quadratic transformation of nonviolent rate was necessary because this improved the linear relationship between nonviolent crime rates and the predictors. We also included quadratic terms of some of the predictors. Second, but running Forward Selection Algorithm on all the $25$ predictors that could potentially affect nonviolent crime using AIC as the guideline, we found a model with $4$ significant predictors for nonviolent crimes: proportion of households in a community that have family size greater than or equal to $6$, community population proportion that are not high school graduate, median rent of an apartment in a community, and proportion of children in a community that have two parents in one household. …show more content…
```{r, echo=FALSE, warning=FALSE, message=FALSE} m9<-lm(nonViolent^2 ~ loglargeHH + I(notHSG^2) + logmedRent + I(tPar^2),data=cr4) plot(m9,1) ```
Looking at the $Y$ $vs$ $\hat{Y}$ plot, we see that the predictive nonviolent crime rates from our model does not fit the data very well. Those data points with low nonviolent crime rates cause the slope of the $Y=X$ line to decrease. They are good explanations for low adjusted-$R^2$ of $0.1741$.
```{r, echo=FALSE, warning=FALSE,