732G21/732G28/732A35 Lecture 4
Variance-covariance matrix for the regression coefficients 2
Variance-covariance matrix of the model errors/residuals 3 where and
Multiple regression model (theoretical) 4 Multiple regression model (for a sample)
ANOVA table for multiple regression 5 Source of variationSSdfMS Regression p-1 Error n-p Total n-1 where J is a n * n matrix of ones
Example data set (car prices) 6 Y (Price in SEK)X 1 = YearX 2 = No. of kilometers driven n = 59 We have collected information about cars of a certain model.
Scatter chart price/year 7
Scatter chart price/No. kilometers 8
Regression output from car example Regression Analysis: Price versus Year, Kilometers The regression equation is Price = Year Kilometers Predictor Coef SE Coef T P Constant Year Kilometers S = R-Sq = 90.2% R-Sq(adj) = 89.9% Analysis of Variance Source DF SS MS F P Regression E E Residual Error Total E+11 9
Interval estimation for multiple regression Confidence interval: where Prediction interval: where 10
Regression Analysis: Price versus Year, Kilometers The regression equation is Price = Year Kilometers Predictor Coef SE Coef T P Constant Year Kilometers S = R-Sq = 90.2% R-Sq(adj) = 89.9% Analysis of Variance Source DF SS MS F P Regression E E Residual Error Total E+11 Predicted Values for New Observations New Obs Fit SE Fit 95% CI 95% PI (400716, ) (353282, ) Values of Predictors for New Observations New Obs Year Kilometers
Four-in-one plot of residuals for car example 12
Residuals plotted against predictors 13
Example data set (car prices) 14 Y (Price in SEK) X 1 = Year X 2 = No. of kilometers X 3 = Equipment level Standard Standard Luxury Standard Standard Luxury Luxury Standard
Scatter chart of price/equipment level 15
Regression Analysis: Price versus Year, Kilometers, Equipment The regression equation is Price = Year Kilometers Equipment Predictor Coef SE Coef T P Constant Year Kilometers Equipment S = R-Sq = 90.0% R-Sq(adj) = 89.4% Analysis of Variance Source DF SS MS F P Regression E E Residual Error Total E+11 Source DF Seq SS Year E+11 Kilometers E+11 Equipment