Question
The data set ex1516 from Sleuth3 has data on firearm and vehicle deaths between 1968 and 1993. Below code will allow you to look at
The data set ex1516 from Sleuth3 has data on firearm and vehicle deaths between 1968 and 1993. Below code will allow you to look at the first 6 observations of the data.
library(Sleuth3)
head(ex1516)
a)Use a simple linear regression model to test if there is an increasing trend in firearm deaths.
b)Any statistical concerns about the model fit? Hint look at acf(resid(model)) or pacf(resid(model)), where "model" represent the linear model you fit in part (a).
c)Fit an AR(1) error model to test if there is an increasing trend in firearm deaths. Again let "model" represent the model you fit in part (a). The following will be useful code to fit the AR(1) error model and get the appropriate summary output.
library(orcutt)
t1 <- cochrane.orcutt(m1)
summary(t1)
d)Explain why an AR(1) error model should be used instead of the simple linear regression model.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started