Introducing
Your new presentation assistant.
Refine, enhance, and tailor your content, source relevant images, and edit visuals quicker than ever before.
Trending searches
Summary of Variables
Total violent crime over time
dd
Median income
Graduation Rate by age 25
Results
Possible improvements to model
Unemployment rate
Median age
ddd
D
M2: Transformmed model
Correlation between variables
Limitations
Transform graduation variable using log()
fitTrans1 = lm(total~I(log(graduation))+income+unemployment.rate+median.age,data = crime)
summary(fitTrans1)
vif decreases
especially for graduation
Compared to the original model, graduation and unemployment rate are more strongly correlated, while income and median age are weaker.
Problem Description
Exclude unemployment rate
Transform income variable using X^2 based on the last model
fitTrans3 = lm(total~I(log(graduation))+I((income)^2)+median.age,data = crime)
fitTrans2 = lm(total~I(log(graduation))+I((income)^2)+unemployment.rate+median.age,data = crime)
vif decreases a lot
but...
p-value for unemplyment rate = 0.93
we will exclude unemployment rate in next model
Conclusion
M3:
Fitted Original Model (M1)
Crime rates has been steadily decreasing since 1991. As of 2007, we are safer now than 20 years ago.
Final Model
Data collection
Because there are still strong correlation bewteen our three predictor varables, one of the variable is considered to be dropped.
All the p-values are approximately equal to zero.
All predictor variables are significant.
Drop median.age
fit = lm(total~graduation+income+unemployment.rate+median.age,data = crime)
Our model becomes:
fitR = lm(total~I(log(graduation))+I((income)^2),data = crime)
Gathered from online datases and the United States census From 1967 to 2012
Figure 2: qqnorm and qqline
Figure 1: fitted value vs. residual
Function for crime prediction is 90.5 (B1) - 14.95 (B2) - 2.461 (B3) + 235.8 (B4)
Our model shows that graduation rate has the highest positive impact on violent crime, while median income had negative.
Response variable:
Model selection :
vif drops to 4.87
However.....
stepwise method
vif is pretty high, which is greater than 100 , serious multicollinearity exists
AIC=398.66 (ALL variables included)
Predictor variable:
The new predictor function is -1417 + 730.1 (B1) - 8.540E-7 (B2). Graduation rate is positively correlated with crime rates, while income is negative.