Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #PART A
- plot(auction$Price~auction$Age)
- model <- lm(auction$Price~auction$Age)
- summary(model)
- abline(model)
- #PART B
- #Least squares estimate of the intercept:-381.860
- #Least squares estimate of the slope: 11.808
- #estimated error variance: 249.6^2 = 62300.16
- #PART C
- # When age if the clock increases by one year, the price increases or decreases by 11.808 pounds sterling.
- #PART D
- # 62.37% of variation in the response is explained by the values of the predictor.
- #PART E
- #The F-statistic is 46.42 (2dp) for testing H0: beta1 = 0 versus H1: beta1 is the slope term in the model.
- # very large F statistic means
- #The corresponding p-value is 2.115e-07, hence we have very strong evidence against the null meaning
- # This
- #PART F
- sqrt(46.42)
- # = 6.813222 = observed t test statistic that is equivalent to the Ftest considered in part e
- # the computation ofthe p value for the test to be modified to the one sided alternative H1: beta1 > 0
- #
- 6.813222/2
- anova(model)
- -381.860 + 11.808*170
- confint()
Advertisement
Add Comment
Please, Sign In to add comment