You are to make a prediction of the response variable when ffarea=15, age=5, mfee=27, beds=3. You are to fit three multiple regression models with the response variable askpr: (i) 2 explanatory variables ffarea, age (ii) 3 explanatory variables ffarea, age, mfee (iii) 4 explanatory variables ffarea, age, mfee, beds After you have copie
The questions involve the data set for asking prices of Richmond townhouses obtained on 2014.11.03.
For your subset, the response variable is:
asking price divided by 10000:
askpr=c(48.5, 78.8, 59.8, 79.8, 74.8, 50.5, 56.8, 50.8, 81.9, 48.8, 62.8888, 51.68, 46.8, 55.8, 53.8, 60.8, 73.9, 56.88, 86.8, 53.9, 62.9, 25.9, 58.8, 45.99, 47.9, 65.99, 77.8, 68.8, 40.9, 79.99, 68.8, 108.8, 51.99, 54.98, 57.8, 50.8, 73.8, 68.5, 41.99, 71.99, 58.68, 65.8, 61.5, 40.8, 58.39, 47.8, 26.99, 54.8, 54.8, 52.4)
The explanatory variables are:
(i) finished floor area divided by 100
ffarea=c(14.8, 19.48, 17.63, 15.25, 17.48, 12.26, 15.5, 16.6, 20.95, 14.8, 15.77, 15.1, 16.2, 13.06, 10.95, 13.2, 15.15, 15.78, 15.08, 11.84, 14, 6.1, 17.37, 16.01, 12.1, 22.78, 16.5, 15.95, 16.06, 22, 16.9, 23.98, 12.09, 13.06, 12.01, 12.27, 17.54, 15.76, 12.9, 15.05, 13.96, 13.45, 14.5, 12.26, 15.09, 13.34, 10.5, 11.26, 15.46, 16.22)
(ii) age
age=c(24, 11, 26, 3, 5, 3, 23, 23, 19, 50, 6, 20, 30, 0, 18, 3, 0, 17, 1, 15, 5, 11, 26, 25, 7, 35, 3, 18, 25, 20, 8, 16, 7, 1, 0, 17, 9, 4, 44, 8, 9, 1, 7, 29, 8, 32, 37, 0, 41, 25)
(iii) monthly maintenance fee divided by 10
mfee=c(16.1, 20.4, 32, 35, 29.7, 18, 17.4, 19.9, 34.8, 25, 35.7, 24.5, 16, 18.6, 24.7, 18.9, 22.2, 17.3, 48.8, 21, 19.6, 17.1, 31, 33.7, 18, 57.4, 25.4, 23.6, 24.4, 26.7, 19.4, 36.9, 18.1, 19.6, 14.2, 25.2, 18.2, 22.1, 23.2, 22.3, 22, 18.2, 18.7, 19.8, 20.3, 24.5, 28, 24.8, 31, 36.4)
(iv) number of bedrooms
beds=c(3, 3, 5, 2, 4, 3, 3, 4, 1, 3, 3, 3, 4, 3, 2, 3, 4, 4, 3, 2, 3, 1, 3, 3, 3, 2, 4, 3, 2, 3, 4, 3, 3, 3, 3, 2, 4, 4, 3, 3, 3, 3, 3, 3, 4, 3, 2, 2, 3, 3)
You are to make a prediction of the response variable when ffarea=15, age=5, mfee=27, beds=3.
You are to fit three multiple regression models with the response variable askpr:
(i) 2 explanatory variables ffarea, age
(ii) 3 explanatory variables ffarea, age, mfee
(iii) 4 explanatory variables ffarea, age, mfee, beds
After you have copied the above R
richmondtownh=data.frame(cbind(askpr,ffarea,age,mfee,beds))
Please use 3 decimal places for the answers below which are not integer-valued
Part a)
The values of adjusted R2R2 for the above models with 2, 3 and 4 explanatory variables are respectively:
2 explanatory:
3 explanatory:
4 explanatory:
Part b)
For the best of these 3 models based on adjusted R2, the number of explanatory variables is:
Part c)
For the best of these 3 models based on adjusted R2, the least squares coefficient for ffarea is
and a 95% confidence interval for βffarea is
Step by step
Solved in 3 steps with 6 images