Please use 3 decimal places for the answers below which are not integer-valued P
ID: 3354844 • Letter: P
Question
Please use 3 decimal places for the answers below which are not integer-valued Part a) The values of adjusted R* for the above models with 2, 3 and 4 explanatory variables are respectively: 2 explanatory: 0.7736 3 explanatory: 0.8123 4 explanatory: 0.8138 Part b) For the best of these 3 models based on adjusted R2, the number of explanatory variables is 4 Part c) For the best of these 3 models based on adjusted R, the least squares coefficient for ffarea is 3.61357 and a 95% for confidence interval for Bffarea is 2.8569 to4.370 Part d) For the best of these 3 models based on adjusted R2 , get the prediction, SE and 95% prediction interval when the future values of the explanatory variables are: ffarea-18, age-11, mfee-29, beds-3 prediction: 75.64428 and the upper endpoint of the 95% prediction interval is [63.279,88.01 and its SEExplanation / Answer
> askpr=c(59.8, 62.8888, 60.8, 86.8, 53.8, 68.5, 57.5, 40.8,
+ 58.39, 68.8, 48.5, 55.8, 53.9, 108.8, 65.8, 55.2, 50.8,
+ 54.8, 78.8, 57.8, 47.9, 41.99, 73.9, 56.8, 49.9, 46.8,
+ 53.8, 62.9, 58.68, 71.99, 52.4, 77.8, 50.5, 48.8, 68.8,
+ 33.7, 51.68, 74.8, 47.8, 40.8, 79.99, 56.88, 50.8, 73.8,
+ 79.8, 81.9, 58.8, 51.99, 54.98, 68.5)
>
> ffarea=c(17.63, 15.77, 13.2, 15.08, 10.95, 13.59, 13.46, 14, 15.09,
+ 15.95, 14.8, 13.06, 11.84, 23.98, 13.45, 15.3, 16.6, 11.26, 19.48,
+ 12.01, 12.1, 12.9, 15.15, 15.5, 15.6, 16.2, 12.22, 14, 13.96, 15.05,
+ 16.22, 16.5, 12.26, 14.8, 16.9, 12, 15.1, 17.48, 13.34, 12.26, 22, 15.78,
+ 12.27, 17.54, 15.25, 20.95, 17.37, 12.09, 13.06, 15.76)
>
> age=c(26, 6, 3, 1, 18, 2, 10, 38, 8, 18, 24, 0, 15, 16, 1, 9, 23, 0, 11,
+ 0, 7, 44, 0, 23, 20, 30, 9, 5, 9, 8, 25, 3, 3, 50, 8, 28, 20, 5, 32, 29,
+ 20, 17, 17, 9, 3, 19, 26, 7, 1, 4)
>
> mfee=c(32, 35.7, 18.9, 48.8, 24.7, 17, 22.1, 23, 20.3, 23.6, 16.1, 18.6,
+ 21, 36.9, 18.2, 16.9, 19.9, 24.8, 20.4, 14.2, 18, 23.2, 22.2, 17.4, 27,
+ 16, 18.5, 19.6, 22, 22.3, 36.4, 25.4, 18, 25, 19.4, 25.9, 24.5, 29.7, 24.5,
+ 19.8, 26.7, 17.3, 25.2, 18.2, 35, 34.8, 31, 18.1, 19.6, 22.1)
>
> beds=c(5, 3, 3, 3, 2, 3, 3, 3, 4, 3, 3, 3, 2, 3, 3, 3, 4, 2, 3, 3, 3, 3,
+ 4, 3, 3, 4, 3, 3, 3, 3, 3, 4, 3, 3, 4, 2, 3, 4, 3, 3, 3, 4, 2, 4, 2, 1,
+ 3, 3, 3, 4)
>
> richmondtownh=data.frame(cbind(askpr,ffarea,age,mfee,beds))
>
Part a)
> ##(i) 2 explanatory variables ffarea, age
>
> model_2=lm(askpr~ffarea+ age, data=richmondtownh)
> summary(model_2)
Call:
lm(formula = askpr ~ ffarea + age, data = richmondtownh)
Residuals:
Min 1Q Median 3Q Max
-10.5038 -5.4918 -0.5833 3.8010 17.8011
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 10.56673 5.31840 1.987 0.0528 .
ffarea 3.91595 0.35066 11.167 8.06e-15 ***
age -0.62034 0.07819 -7.934 3.20e-10 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 6.593 on 47 degrees of freedom
Multiple R-squared: 0.7829, Adjusted R-squared: 0.7736
F-statistic: 84.73 on 2 and 47 DF, p-value: 2.587e-16
>
> ## (ii) 3 explanatory variables ffarea, age, mfee
>
> model_3=lm(askpr~ffarea+ age+mfee , data=richmondtownh)
> summary(model_3)
Call:
lm(formula = askpr ~ ffarea + age + mfee, data = richmondtownh)
Residuals:
Min 1Q Median 3Q Max
-11.2850 -4.7046 -0.3415 4.1319 12.4474
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 7.09462 4.95802 1.431 0.15921
ffarea 3.44891 0.34982 9.859 6.38e-13 ***
age -0.63094 0.07127 -8.853 1.69e-11 ***
mfee 0.45117 0.13804 3.268 0.00205 **
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 6.003 on 46 degrees of freedom
Multiple R-squared: 0.8238, Adjusted R-squared: 0.8123
F-statistic: 71.69 on 3 and 46 DF, p-value: < 2.2e-16
>
> ## (iii) 4 explanatory variables ffarea, age, mfee, beds
>
> model_4=lm(askpr~ffarea+ age+mfee+beds , data=richmondtownh)
> summary(model_4)
Call:
lm(formula = askpr ~ ffarea + age + mfee + beds, data = richmondtownh)
Residuals:
Min 1Q Median 3Q Max
-10.8189 -4.3918 -0.0366 4.4583 11.6195
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 10.94246 5.92997 1.845 0.07158 .
ffarea 3.61357 0.37568 9.619 1.73e-12 ***
age -0.63597 0.07111 -8.943 1.53e-11 ***
mfee 0.39328 0.14608 2.692 0.00993 **
beds -1.58401 1.35164 -1.172 0.24740
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 5.979 on 45 degrees of freedom
Multiple R-squared: 0.829, Adjusted R-squared: 0.8138
F-statistic: 54.54 on 4 and 45 DF, p-value: < 2.2e-16
2 explanatory=0.7829=0.783
3 explanatory=0.8238=0.824
4 explanatory=0.829
Part b) Ans: 4
Part c) Ans:3.61357 with 95% confidence interval (2.85692279, 4.3702195)
> confint(model_4, level = 0.95)
2.5 % 97.5 %
(Intercept) -1.00112414 22.8860401
ffarea 2.85692279 4.3702195
age -0.77919931 -0.4927379
mfee 0.09905734 0.6875093
beds -4.30634982 1.1383371