UNSW Sydney · FACULTY OF ENGINEERING

CVEN9407 Chap.7 Multiple Regression and Its Diagnostics

- one subject, every graph, every model, every mark
7 Chapters4-page Bible
Our own words - no uploaded lecturer files
Updated for this semester
Chapter 7 of 12 · CVEN9407

Multiple Regression and Its Diagnostics

The first project deliverable is a multiple regression of crash frequency with full diagnostics, and this chapter supplies both halves. It explains partial coefficients, dummy coding of categories such as speed zone, and adjusted R squared.

It then covers the three problems the project brief asks you to check: multicollinearity through variance inflation factors, heteroscedasticity through residual plots and the Breusch-Pagan test, and autocorrelation through the Durbin-Watson statistic.

A worked regression output is read line by line, and the chapter ends with a fixed diagnostic routine and the limits of a linear model for counts.

The project brief lists the checks it expects with the linear model: autocorrelation of residuals, heteroscedasticity tests, the distribution of residuals and multicollinearity through variance inflation factors, followed by a discussion of the limitations of linear regression for crash modelling.

This chapter covers each item in that order, so the first deliverable can follow it section by section.

In this chapter

What this chapter covers

  • 01

    Partial regression coefficients

  • 02

    Dummy variables and the dummy variable trap

  • 03

    Adjusted R squared

  • 04

    Multicollinearity and variance inflation factors

  • 05

    Heteroscedasticity and the Breusch-Pagan test

  • 06

    Autocorrelation and the Durbin-Watson statistic

  • 07

    Why linear models struggle with counts

Worked example · free

Adjusted R squared and a VIF from one model

Q [3 marks]. A crash regression on 60 sites with 4 coefficients including the intercept has R squared 0.62. An auxiliary regression of one regressor on the others has R squared 0.75. Find adjusted R squared and that regressor's VIF. The mark allocation is our own practice weighting and is not an official university scheme.
Two residual plots that should worry you.Two residual plots that should worry you. Left, residuals plotted against fitted crash counts fan out as the fitted value grows, the signature of heteroscedasticity; right, residuals in month order drift above and below zero in long runs, the signature of positive autocorrelation.Funnel: variance growsRuns: errors persistfitted crashesmonth orderresidual
Two residual plots that should worry you. Left, residuals plotted against fitted crash counts fan out as the fitted value grows, the signature of heteroscedasticity; right, residuals in month order drift above and below zero in long runs, the signature of positive autocorrelation.
  • 1Adjusted R squared = 1 - (1 - 0.62)(60 - 1)/(60 - 4) = 1 - 0.38 x 59/56.
  • 10.38 x 1.0536 = 0.4004, so adjusted R squared = 0.600.
  • 1VIF = 1 / (1 - 0.75) = 4.0: the coefficient's variance is four times what it would be with no overlap, noticeable but below the usual concern level of 5 to 10.
Adjusted R squared is about 0.600 and the VIF is 4.0.
Sia tip — Report a VIF for every regressor in a single table, and mention any above 5 next to the coefficient it affects rather than in a separate section.
Glossary

Key terms

Dummy variable
A dummy variable takes the value 1 when a category applies and 0 otherwise, letting categories enter a regression.
Multicollinearity
Multicollinearity is strong linear overlap among regressors, which inflates coefficient variances and blurs individual effects.
Durbin-Watson statistic
The Durbin-Watson statistic tests first-order autocorrelation in regression residuals, with values near 2 indicating none.
Robust standard errors
Robust standard errors are coefficient standard errors computed so that they remain valid when the error variance is not constant.
Adjusted R squared
Adjusted R squared is the coefficient of determination corrected for the number of coefficients, so it can fall when a weak regressor is added.
Partial coefficient
A partial coefficient is the effect of one regressor on the expected outcome with all other regressors held fixed.
Breusch-Pagan test
The Breusch-Pagan test checks for heteroscedasticity by regressing squared residuals on the regressors and comparing n times R squared with a chi-square.
FAQ

Multiple Regression and Its Diagnostics FAQ

Does heteroscedasticity bias the regression coefficients?

No. Least squares coefficients stay unbiased, but they are no longer the most precise estimators and the usual standard errors are wrong. That makes t tests and confidence intervals unreliable, which is why the brief asks for a heteroscedasticity test.

What VIF value should worry me?

Values near 1 mean little overlap. Many texts treat values above 5 or 10 as a warning that a coefficient's standard error is inflated by collinearity. A high VIF explains an imprecise estimate; it is not by itself a reason to drop the variable.

Why do I lose a dummy when coding speed zones?

Including a dummy for every category alongside the intercept makes the dummies sum to the intercept column, perfect collinearity, so the model cannot be estimated. One category is left out as the base, and every dummy coefficient is a difference from it.

How should I aggregate crashes for the regression?

The brief suggests grouping by location, such as an intersection or road segment, or by time interval, such as monthly counts. Choose the unit that matches your explanatory variables: speed zone and geometry suit locations, while weather and holidays suit months.

What do I do if the Durbin-Watson statistic shows autocorrelation?

First look for a missing variable or a seasonal pattern that the model ignores. If autocorrelation remains, use standard errors that allow for it or move to a time series specification, and report how the conclusions changed after the fix.

Study strategy

Assessment move

Fit your first project regression early, then run the diagnostic routine in the same order every time: residual distribution, heteroscedasticity, autocorrelation, collinearity. For each check, write one sentence on what it found and one on what you did about it. Read every coefficient as a partial effect, and name the base category whenever you discuss a dummy.

Keep a copy of each diagnostic plot, since the presentation panel may ask how you know the errors behave.

Working through Multiple Regression and Its Diagnostics in CVEN9407? Sia is AskSia’s AI Engineering tutor — ask any CVEN9407 Multiple Regression and Its Diagnostics question and get a clear, step-by-step explanation grounded in how CVEN9407 is taught and assessed. Read this chapter free, then take your hardest questions to Sia.

A+Everything unlocked
Unlocks this Bible + all 100 of your UNSW Sydney subjects - and 1,000+ Bibles across every Australian university.
Sia - your CVEN9407 tutor, unlimited, worked the way the exam marks it
The full 4-page Bible + practice bank with worked solutions
Chrome extension - sync your LMS so Sia knows your deadlines
Bilingual EN / Chinese on every Bible and every Sia answer
$0.99 Trial
30-day money-back · cancel in one tap · how it works
CVEN9407 · Transport Demand Modelling - independent study guide on the AskSia Library. More UNSW Sydney subjects · Microeconomics across all universities