第13章多重回归模型 ultiple Regression Models
第13章 多重回归模型 Multiple Regression Models
本章概要 The Multiple Regression Model Contribution of Individual Independent Variables Coefficient of Determination Categorical Explanatory Variables Transformation of variables Model Building
本章概要 • The Multiple Regression Model • Contribution of Individual Independent Variables • Coefficient of Determination • Categorical Explanatory Variables • Transformation of Variables • Model Building
The Multiple regression Model 多重回归模型 Relationship between I dependent 2 or more independent variables is a linear function Population Random Population slopes Y-intercept Error Y=Bo+BX+BX2i+ooo+BXoi+ai Y=0+X+b,X2i+000+boXi +ei Dependent(Response) Independent(Explanatory) variable for sample variables for sample model
The Multiple Regression Model 多重回归模型 Yi X i X i pXpi i = + + +•••+ + 0 1 1 2 2 Relationship between 1 dependent & 2 or more independent variables is a linear function Population Y-intercept Population slopes Dependent (Response) variable for sample Independent (Explanatory) variables for sample model Random Error Yi b b X i b X i bpXpi ei ˆ = 0 + 1 1 + 2 2 +•••+ +
Sample multiple regression Model 简单多重回归-线性 Y=50+,X+b,X2i +..+b, Xoi +e Y=b+bX1+b2×2+oo+bxp
Sample Multiple Regression Model 简单多重回归----线性 X2 X1 Y Yi b b X i b X i bpXpi ˆ = 0 + 1 1 + 2 2 +•••+ Yi b b X i b X i + bpXpi + ei = + + + • • • 0 1 1 2 2 ei
Multiple regression Model: Example Develop a model for oil (Gal)Temp (F)Insulation estimating heating oil 275.30 40 3 363.80 27 3 used for a single family 164.30 40 10 home in the month of 40.80 73 january based on average 94.30 64 temperature and amount 230.90 34 6 of insulation in inches 366.70 9 6 300.60 8 10 237.80 23 10 121.40 63 3 31.40 65 10 203.50 41 441.10 21 3 323.00 38 52.50 58 10
O il (G a l) T e m p In su la tio n 275.30 4 0 3 363.80 2 7 3 164.30 4 0 1 0 40.80 7 3 6 94.30 6 4 6 230.90 3 4 6 366.70 9 6 300.60 8 1 0 237.80 2 3 1 0 121.40 6 3 3 31.40 6 5 1 0 203.50 4 1 6 441.10 2 1 3 323.00 3 8 3 52.50 5 8 1 0 Multiple Regression Model: Example ( Develop a model for 0F) estimating heating oil used for a single family home in the month of January based on average temperature and amount of insulation in inches
Sample regression Model: Example =+b×1+b221+●+bxp Coefficien ts Excel Output In tercept 562.1510092 x Variable 1 -5.436580588 x Variable 2 -20.01232067 Y1=562.151-5.437X1-20.012X2 For each degree increase in temperature, the average amount of For each increase in one inch heating oil used is decreased by of insulation, the use of heating 5.437 gallons, holding insulation oil is decreased by 20.012 constant gallons, holding temperature constant
Sample Regression Model: Example Yi b b X i b X i bpXpi ˆ = 0 + 1 1 + 2 2 +•••+ C o efficien ts I n te r c e p t 5 6 2 . 1 5 1 0 0 9 2 X V a r i a b l e 1 -5 . 4 3 6 5 8 0 5 8 8 X V a r i a b l e 2 -2 0 . 0 1 2 3 2 0 6 7 Excel Output i i X i Y . . X . ˆ = 562 151 − 5 437 1 − 20 012 2 For each degree increase in temperature, the average amount of heating oil used is decreased by 5.437 gallons, holding insulation constant. For each increase in one inch of insulation, the use of heating oil is decreased by 20.012 gallons, holding temperature constant
Using The Model to Make Predictions Estimate the average amount of heating oil used for a home if the average temperature is 300 and the insulation is 6 inches 562.151-5.437X1-20.012X 2 =562.151-5437°30-20.012●6 =278.969 The estimated heating oil used is 278. gallons
Using The Model to Make Predictions 278 969 562 151 5 437 30 20 012 6 562 151 5 437 1 20 012 2 . . . . Yˆ i . . X i . X i = = − • − • = − − Estimate the average amount of heating oil used for a home if the average temperature is 300 and the insulation is 6 inches. The estimated heating oil used is 278.97 gallons
Coefficient of Multiple Determination Excel Output SSR Regression statistics SST M le R 0.982654757 R square 0.96561037 A djus Square(0.959878766 Adjusted r2 Standard Eror.01378323 reflects the number observations 15 of explanatory variables and sample sIze is smaller than
Coefficient of Multiple Determination R eg ressio n S tatistics M u lt ip le R 0 . 9 8 2 6 5 4 7 5 7 R S q u a re 0 . 9 6 5 6 1 0 3 7 1 A d ju s t e d R S q u a re 0 . 9 5 9 8 7 8 7 6 6 S t a n d a rd E rro r 2 6 . 0 1 3 7 8 3 2 3 O b s e rva t io n s 1 5 Excel Output SST SSR rY , = 2 12 Adjusted r2 •reflects the number of explanatory variables and sample size • is smaller than r2
Residual plots 残差散点图 Residuals vs y a May need to transform Y variable Residuals VS XI a May need to transform X variable Residuals Vs x2 a May need to transform X, variable Residuals vs time 口 May have autocorrelation(自回归)
Residual Plots 残差散点图 • Residuals Vs Yi May need to transform Y variable • Residuals Vs X1 May need to transform X1variable • Residuals Vs X2 May need to transform X2 variable • Residuals Vs Time May have autocorrelation(自回归)
Residual plots: Example Temperature residual plot Excel Output 20 Insulation Residual p lot T 20 60 20 8 12 No Discernable Pattern
Insulation Residual Plot 0 2 4 6 8 1 0 1 2 Residual Plots: Example Excel Output No Discernable Pattern Temperature R esidual Plot - 6 0 - 4 0 - 2 0 0 2 0 4 0 6 0 0 2 0 4 0 6 0 8 0 Residuals