In: Statistics and Probability
Consider the applications for home mortgages data in the file of P12_04.xlsx. Use multiple regression to develop an equation that can be used to predict future applications for home mortgages (hint: use dummy variables for the quarters and create a time variable for the quarter numbers)
Quarter | Year | Applications |
1 | 1 | 96 |
2 | 1 | 114 |
3 | 1 | 112 |
4 | 1 | 81 |
1 | 2 | 97 |
2 | 2 | 103 |
3 | 2 | 120 |
4 | 2 | 99 |
1 | 3 | 105 |
2 | 3 | 110 |
3 | 3 | 117 |
4 | 3 | 96 |
1 | 4 | 74 |
2 | 4 | 94 |
3 | 4 | 100 |
4 | 4 | 96 |
1 | 5 | 95 |
2 | 5 | 122 |
3 | 5 | 113 |
4 | 5 | 100 |
1 | 6 | 102 |
2 | 6 | 96 |
3 | 6 | 116 |
4 | 6 | 98 |
For the above data, taking 1st year's 1 quarter as base point, all the quarter hence can be represented using dummy variable. Year and Quarter can hence be removed and replaced by dummy vaiable converting it into normal single variable regression equation;
Thus, data can be represented in below mentioned format -
Quarter | Year | Dummy_variable | Applications |
1 | 1 | 1 | 96 |
2 | 1 | 2 | 114 |
3 | 1 | 3 | 112 |
4 | 1 | 4 | 81 |
1 | 2 | 5 | 97 |
2 | 2 | 6 | 103 |
3 | 2 | 7 | 120 |
4 | 2 | 8 | 99 |
1 | 3 | 9 | 105 |
2 | 3 | 10 | 110 |
3 | 3 | 11 | 117 |
4 | 3 | 12 | 96 |
1 | 4 | 13 | 74 |
2 | 4 | 14 | 94 |
3 | 4 | 15 | 100 |
4 | 4 | 16 | 96 |
1 | 5 | 17 | 95 |
2 | 5 | 18 | 122 |
3 | 5 | 19 | 113 |
4 | 5 | 20 | 100 |
1 | 6 | 21 | 102 |
2 | 6 | 22 | 96 |
3 | 6 | 23 | 116 |
4 | 6 | 24 | 98 |
Coefficients | Standard Error | t Stat | P-value | |
Intercept | 101.8007 | 5.017148 | 20.29056 | 9.85E-16 |
Dummy_quarter | 0.042609 | 0.351127 | 0.121348 | 0.904517 |
The regression show significant p-value Thus model is valid.
Thus, regression equation will be
Application = 101.807 + 0.042*Dummy_variable
where dummy variable = (Year-1)*4 + quarter
thus, Application = 101.807 + 0.1704*(year-1) + 0.042*Quarter