Title: Texas Weather Example Multiple Linear Regression
1Texas Weather ExampleMultiple Linear Regression
2Data
- Response (Y) Average January High Temp
- Predictors
- Latitude
- Elevation
- Longitude
- Units n16 County Weather Stations
County Temp Lat Elev Long
Harris 56 29.767 41 95.367
Dallas 48 32.85 440 96.85
Kennedy 60 26.933 25 97.8
Midland 46 31.95 2851 102.183
Deaf Smith 38 34.8 3840 102.467
Knox 46 33.45 1461 99.633
Maverick 53 28.7 815 100.483
Nolan 46 32.45 2380 100.533
El Paso 44 31.8 3918 106.4
Collington 41 34.85 2040 100.217
Pecos 47 30.867 3000 102.9
Sherman 36 36.35 3693 102.083
Travis 52 30.3 597 97.7
Zapata 60 26.9 315 99.283
Lasalle 56 28.45 459 99.217
Cameron 62 25.9 19 97.433
3Estimating the Full Model
- Temp b0 b1LAT b2ELEV b3LONG e
Coefficients Standard Error t Stat P-value
Intercept 151.2976 25.13336 6.019792 6.03E-05
Lat -1.99323 0.13639 -14.6142 5.23E-09
Elev -0.00096 0.000568 -1.68344 0.118102
Long -0.38471 0.228584 -1.68302 0.118185
4Testing the Full Model
- H0 b1 b2 b3 0
- HA Not all bi 0
- TS Fobs MSR/MSE 491.138
- P-Value P(F491.138) ? 0
ANOVA
df SS MS F Significance F
Regression 3 934.328 311.4427 491.138 8.1236E-13
Residual 12 7.609494 0.634125
Total 15 941.9375
5Testing Individual Partial Coefficients
- H0 bi 0 HA bi ? 0 TS tobs bi/SE(bi)
- Latitude tobs -14.61 P-value ? 0
- Elevation tobs -1.68 P-value .1182
- Longitude tobs -1.68 P-value .1182
Coefficients Standard Error t Stat P-value
Intercept 151.2976 25.13336 6.019792 6.03E-05
Lat -1.99323 0.13639 -14.6142 5.23E-09
Elev -0.00096 0.000568 -1.68344 0.118102
Long -0.38471 0.228584 -1.68302 0.118185
6Comparing Regression Models
- Note Controlling for ELEV and LAT, LONG does not
appear significant (at a.10 level) and same
result holds for LONG. - Test whether after controlling for LAT, neither
ELEV or LONG related to TEMP - H0 b2 b3 0 HA b2 and/or b3 ? 0
- Complete Model
- Temp b0 b1LAT b2ELEV b3LONG e
- Reduced Model
- Temp b0 b1LAT e
7Complete and Reduced Models
Complete ANOVA (n16, k3)
df SS MS
Regression 3 934.328 311.4427
Residual 12 7.609494 0.634125
Total 15 941.9375
Reduced ANOVA (g1)
df SS MS
Regression 1 881.003 881.003
Residual 14 60.9345 4.352465
Total 15 941.9375
8Test of H0 b2 b3 0
- SSRc 934.328, SSEc 7.609
- SSRr 881.003
- N16, k3, g1
9Model with Latitude and Elevation
Coefficients Standard Error t Stat P-value
Intercept 109.2589 2.978572874 36.68162 1.64E-14
Lat -1.83216 0.103801087 -17.6507 1.83E-10
Elev -0.00185 0.000218782 -8.43921 1.24E-06
ANOVA
df SS MS F Significance F
Regression 2 932.532 466.266 644.446 9.91E-14
Residual 13 9.40568 0.72351
Total 15 941.938