Before you start
You will be able to
- State the four conditions of the linear regression model and say which results (coefficients, standard errors, prediction intervals) depend on each.
- Diagnose curvature, unequal spread, non-normal errors and dependence from residual plots, a normal Q–Q plot and residuals in time order.
- Calculate the Durbin–Watson statistic and the Breusch–Pagan statistic, and interpret them with their limitations.
- Compare ordinary and HC3 robust standard errors and decide which to report.
- Distinguish failures that bias coefficients (a wrong form, an omitted trend) from failures that leave them unbiased but make standard errors and intervals wrong.
Review first
- Inference for coefficients — The population model, its conditions and the standard errors and t tests that depend on them.
- Residuals and R² — Residuals, the residual standard error and a first residual plot.
- Multiple regression — Slopes with other predictors held fixed, and why leaving out a predictor can change them.
- The normal distribution — Normal scores and the normal probability plot, used here on residuals.
Fictional case A fictional coffee business founded by Ana Lim. It starts as a catering and barista-training service, opens its own cafés and an online shop for beans, and plans a canned cold brew.
The idea
Fictional case
Ana has a model for Harbourside’s daily footfall from its 306 days in 2027: the day’s high temperature, the rain, whether it is a weekend and whether it is one of the five festival days. It accounts for 92.2% of the variation in footfall, its residual standard error is 19.5 people, and every slope has a p-value below 0.001. She wants to use it twice: to say how much a warmer day goes with, and to roster baristas from a prediction interval. Before she does either, she checks whether the model’s assumptions hold.
What the model assumes
The population model behind every regression in this course is . Fitting it by least squares always works; the t tests, confidence intervals and prediction intervals that the output prints rely on four conditions about the error . Linearity: at every combination of the predictors the errors average zero, so the model’s form is right. Independence: one row’s error tells you nothing about another’s. Normality: the errors follow a normal distribution. Equal variance: the errors have the same spread, σ, whatever the predictors. These are the LINE conditions named in inference-for-coefficients; this lesson checks them.
You never see the errors, only the residuals, e = y − ŷ, which are their estimates. So every check in this lesson is a look at the residuals for the pattern a failure would leave. If the model is right, the residuals should look like random noise: no curve, no funnel, no drift, no clusters. Any structure you can see is structure the model has missed.
Residuals against fitted values: the form
The first residual plot to draw is the residuals against the fitted values. The figure shows the four patterns it can reveal. A patternless horizontal band (A) is what a good model leaves. A curve (B) means the straight-line form is wrong. A funnel (C) means the spread changes with the size of the prediction. A drift when the residuals are plotted in time order (D) means neighbouring rows share something the model doesn’t contain.
The cafés’ iced share shows pattern B. A straight line of iced share on the day’s high, across all 612 café-days, has R² = 0.883, which sounds excellent. Its residuals are not random: they average +0.143 on days below 45°F, −0.095 between 55 and 65°F, and +0.062 between 75 and 85°F. The share follows an S-shaped curve, flat on cold days, steep in the middle, levelling off on hot days, and a line cuts across it. Every prediction from the line is too low at the cold end and too high in the cool middle, so this failure biases the predictions and the slope itself is an average of very different rates.
A funnel: unequal spread
Harbourside’s footfall model shows pattern C. On ordinary days with fitted footfall below 100 people, the residuals have a standard deviation of 14.6; on days with fitted footfall between 150 and 200 it is 24.0; on the five festival days it is 48.1. Busy days vary by more people than quiet days do. That is natural for counts that grow by percentages: a warm Saturday that is 10% busier than expected is 20 people out, a cold Tuesday 10% busier is 8. In this fictional log footfall is built multiplicatively, so a funnel in levels is the case’s planted fact.
Unequal spread is called heteroskedasticity (constant spread is homoskedasticity). It does not bias the slopes: on average least squares still finds the right ones. It does make the usual standard errors wrong, because their formula assumes one σ for every row, and it makes a single prediction interval too wide on quiet days and too narrow on busy ones, which is exactly where rostering matters.
Normality: the Q–Q plot
A normal probability plot of the residuals, also called a normal Q–Q plot, puts the sorted residuals against the values a normal sample of the same size would have. Harbourside’s residuals follow the line through the middle and leave it at the ends: the largest studentized residual is 4.66, on the festival Saturday of 29 May, and the next 3.68, on 16 October. Eleven of the 306 days lie beyond ±2, close to the 14 a normal sample would give, so the departure is a few extreme days rather than a wholesale change of shape.
Normality matters least of the four. With hundreds of rows, the coefficients’ sampling distribution is close to normal whatever the errors look like, so the t tests still work. It matters most for prediction intervals, which describe single days and so depend on the shape of the errors themselves, and for small samples, where nothing else rescues the t tests.
Independence: residuals in time order
Plotted in date order, Harbourside’s residuals drift (pattern D). They average −21.5 people in March, −13.8 in April and −6.8 in May, and are positive from July on (+11.4 in November). The model has no term for the café building up its trade after opening, so the early months sit below the line and the later ones above it. Neighbouring days’ residuals are alike: their lag-1 autocorrelation is 0.22.
Adding a build-up term removes the drift. It is 0 on opening day, rises evenly to 1 on 29 June, the end of the café’s first four months, and stays at 1; the residuals’ monthly averages then all lie within ±3.8 people. The R² rises from 0.922 to 0.944 and, more to the point, the slope for the day’s high changes from 1.66 to 1.44 people per °F. The missing trend was not just making the residuals untidy: because temperatures rose through the spring while the café was building up, leaving the trend out let the temperature slope take credit for part of the build-up. (A straight-line day count over the whole year is not a fix: it assumes the build-up never stopped, and it pushes the slope the other way, to 1.79.) A pattern in time order is often a sign of a missing predictor, and a missing predictor that goes with the others biases their coefficients.
The two cafés raise a second independence question. Their rows share the same days and the same weather, and their residuals from the two cafés’ own models correlate at 0.33 day by day. Pooling both cafés’ 612 rows as if they were 612 independent observations gets the standard errors wrong, and not always in the same direction: in these data, standard errors that treat each day as a cluster come out a little larger than the printed ones for some slopes and smaller for others (rain, which hits both cafés at once, is one). Fit each café separately, or use standard errors that allow for rows sharing a day.
In depth
What rests on each condition
| Condition | If it fails, the coefficients… | Standard errors and tests | Prediction intervals | Check |
|---|---|---|---|---|
| Linearity (right form, nothing important left out) | are biased | misleading | wrong | residuals against fitted values and against each predictor |
| Independence | are unbiased if the form is right | usually too small | too narrow | residuals in time order; Durbin–Watson |
| Equal variance | are unbiased | wrong (too small or too large) | wrong width at each x | residuals against fitted values; Breusch–Pagan |
| Normality | are unbiased | fine with large n; doubtful with small n | wrong shape, so wrong limits | normal Q–Q plot of the residuals |
Linearity carries the most weight: the other three concern how precise the estimates are, linearity whether they estimate the right thing.
Two further points complete the table. The predictors are treated as fixed numbers measured without error; the Introductory Business Statistics list of assumptions states this, and measurement error in a predictor biases its slope towards zero. And independence of the errors is not the same as independence of the predictors from each other: predictors that move together (multicollinearity) are the previous lesson’s subject and don’t break any of these conditions.
Checking the form
Plot the residuals against the fitted values, and against each numerical predictor in turn: a curve against one predictor shows which term needs a different form. Band the residuals if the plot is crowded: average them within ranges of the fitted value or the predictor, as the iced-share bands above do. Averages that move steadily away from zero, or change sign more than chance would, mean the form is wrong. The NIST/SEMATECH e-Handbook (4.4.4.2) warns that a funnel can be an artefact of a wrong functional form, which is one reason to check the form before the spread.
Testing for unequal spread: Breusch–Pagan
The Breusch–Pagan test asks whether the squared residuals can be predicted from the predictors. Regress on the model’s predictors and take , where is that auxiliary regression’s R². Under equal variance LM follows a chi-square distribution with k degrees of freedom (the number of predictors). This is Koenker’s version, which statsmodels and R report by default (other packages, Stata among them, default to the original); the original divided by an estimate that assumes normal errors.
For Harbourside, LM = 55.7 on 4 degrees of freedom, a p-value below 0.001: the spread clearly changes. Read the test alongside the plot. With hundreds of rows it detects differences in spread too small to matter, and with a dozen rows it can miss a funnel you can see. A significant test also doesn’t say what to do: if the funnel comes from a wrong form, fix the form; if the spread grows in proportion to the mean, a log of y (the next lesson) often removes it.
Robust standard errors
When the spread is unequal but the form is right, the slopes are fine and only their standard errors need repair. Robust standard errors estimate each coefficient’s variance from the residuals row by row instead of from one pooled σ. The version called HC3 divides each squared residual by , where is the row’s leverage (next lesson), which keeps the estimate honest in modest samples. Excel’s ToolPak doesn’t offer them; the regression panel in this lesson does.
| Term | Coefficient | Ordinary SE | HC3 SE | HC3 ÷ ordinary |
|---|---|---|---|---|
| High (°F) | 1.656 | 0.075 | 0.077 | 1.02 |
| Rain (in) | −75.8 | 5.75 | 4.35 | 0.76 |
| Weekend | 69.1 | 2.53 | 3.10 | 1.22 |
| Festival | 329.9 | 9.07 | 24.37 | 2.69 |
Robust standard errors can be larger or smaller than ordinary ones. The festival coefficient rests on five days whose residuals are far larger than the rest, so its ordinary SE was much too small.
Every conclusion here survives: the festival coefficient’s t statistic falls from 36 to 13.5, still far beyond any critical value. That is common with hundreds of rows and large effects, and it is the reason to look rather than assume: in a smaller sample the same switch can move a p-value from 0.01 to 0.2. Robust standard errors repair tests and confidence intervals for coefficients; they don’t repair prediction intervals for single days, which need a model of the spread itself.
The normal Q–Q plot
Sort the n residuals (or, better, the studentized residuals, which put every row on the same scale) and plot them against normal scores , Blom’s plotting positions. Points on a straight line mean normal-looking residuals. A curve bending the same way at both ends means skew; points running off the line in opposite directions at the two ends (an S) mean heavier tails than a normal distribution, with more extreme residuals than it would produce. Harbourside’s residuals have an excess kurtosis of 1.13 (the sample version Excel’s KURT gives): mildly heavy-tailed, with two residuals beyond ±3 where a normal sample of 306 would expect about one, though no more beyond ±2 than expected.
Testing for dependence: Durbin–Watson
For rows in time order, the Durbin–Watson statistic compares neighbouring residuals: . It runs from 0 to 4 and is close to , where is the residuals’ lag-1 autocorrelation. A value near 2 means no first-order autocorrelation; values well below 2 mean positive autocorrelation (neighbours alike), above 2 negative. Its exact critical values depend on n and the number of predictors and come from published tables; in practice a DW below about 1.5 in a daily series deserves a look at the time-order plot.
For Harbourside, DW = 1.55 without the build-up term and 2.15 with it. The statistic only means something when the rows are in time order within one series. The café log lists both cafés day by day, alternating; run on that order, DW compares Harbourside with Millbrook on the same day, not one day with the next. Sort by café, then date, or fit each café separately.
Positive autocorrelation makes the usual standard errors too small, because 306 days that resemble their neighbours carry less independent information than 306 unrelated days. The cure depends on the cause. If the residuals drift because something is missing (a trend, a season, a holiday), add it, as the build-up term did. If neighbouring errors are simply alike after the form is right, time-series methods or autocorrelation-consistent (Newey–West) standard errors are the tools; forecasting courses cover them.
Which failures bias the coefficients
The table’s second column is the one to remember. Only a failure of linearity, in the broad sense of the wrong form or a missing predictor that goes with the included ones (omitted-variable bias), biases the coefficients themselves. Unequal spread, dependence and non-normal errors leave the coefficients unbiased; they make the model’s statements about its own precision wrong. That ranking tells you what to fix first: a wrong form changes the answer, the others change how sure you can be of it.
An order for checking
- Plot residuals against fitted values and against each numerical predictor: is the form right?
- Plot residuals in time order (within each series) and compute DW: is something changing over time?
- Look at the spread in the first plot and run Breusch–Pagan: does it grow with the fitted value?
- Draw the normal Q–Q plot: are a few points far off the line, or is the whole shape wrong?
- Find the points with large studentized residuals or high leverage and check them (the next lesson).
- Fix the most serious problem, refit, and look at all the plots again.
Formulas
Durbin–Watson statistic
- The residual for period t, with the rows in time orderunits of y
- Number of periods
- Lag-1 autocorrelation of the residuals
- Between 0 and 4; near 2 means no first-order autocorrelation
Assumes. Rows in time order within one series; a model with an intercept.
In Excel, with residuals in E2:E41: =SUMPRODUCT((E3:E41-E2:E40)^2)/SUMSQ(E2:E41).
Lag-1 autocorrelation of residuals
- The residual for period t, in time orderunits of y
- The mean residual (0 for a model with an intercept)units of y
- How alike neighbouring residuals are, from −1 to 1
CORREL of the residuals with the same residuals shifted one row gives almost the same value for long series; for short ones the two differ (Tidemark’s eight weeks: 0.77 against 0.69).
Breusch–Pagan test (Koenker’s form)
- R² of the regression of the squared residuals on the model’s predictors
- Number of rows
- Number of predictors (not counting the intercept)
- Test statistic, compared with the chi-square distribution on k df
Assumes. H₀: the error variance is the same for every row.
With one predictor in B and squared residuals in F: =COUNT(F2:F31)*RSQ(F2:F31,B2:B31), and p =CHISQ.DIST.RT(LM,1).
HC3 robust covariance of the coefficients
- The matrix of predictors, with a column of 1s for the intercept
- Row i’s residualunits of y
- Row i’s leverage, between 0 and 1
- Estimated covariance matrix; the square roots of its diagonal are the robust SEsunits of the coefficients, squared
Assumes. The model’s form is right; the errors are independent but may have unequal variances.
MacKinnon and White’s HC3; the ordinary formula replaces the middle matrix with s²X⊤X.
Normal scores for a Q–Q plot (Blom)
- Rank of the residual, 1 for the smallest
- Number of residuals
- The standard normal inverse; Excel’s NORM.S.INV
- The value a normal sample would put at that rank, in SD units
Plot the sorted (studentized) residuals against q₁ … qₙ.
Worked examples
Fictional figures
Tidemark Ferry Kiosk (fictional) models its weekly sales on the number of sailings. Its residuals for eight consecutive weeks, in hundreds of dollars, are 5, 7, 4, −1, −4, −7, −3, −1. Calculate the Durbin–Watson statistic and the lag-1 autocorrelation, and say what they suggest.
| Week | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
|---|---|---|---|---|---|---|---|---|
| Residual | 5 | 7 | 4 | −1 | −4 | −7 | −3 | −1 |
- Differences of neighbours: 7 − 5 = 2, 4 − 7 = −3, −1 − 4 = −5, −4 − (−1) = −3, −7 − (−4) = −3, −3 − (−7) = 4, −1 − (−3) = 2.
- Sum of squared differences: 4 + 9 + 25 + 9 + 9 + 16 + 4 = 76.
- Sum of squared residuals: 25 + 49 + 16 + 1 + 16 + 49 + 9 + 1 = 166.
- Durbin–Watson: . The lag-1 autocorrelation of the eight residuals is 0.69, and ; the approximation is rough with only eight weeks, but both say the same thing.
Answer. DW = 0.46 and r₁ = 0.69: strong positive autocorrelation.
What it means. The residuals run in a block of positive weeks followed by a block of negative ones: the kiosk did better than the model predicted for three weeks and worse for the next five. Something the model lacks, perhaps the school holidays or the weather, changed in week 4. Until it is found, the model’s standard errors are too small and its forecasts for next week should lean on the recent residuals.
Fictional figures
Ana’s Harbourside model (306 days) regresses footfall on the high, rain, a weekend dummy and a festival dummy. The diagnostics: Breusch–Pagan LM = 55.7 (4 df); Durbin–Watson 1.55; the largest studentized residual 4.66; HC3 standard errors as in the table above. A build-up term (0 at opening, 1 from 29 June) added as a fifth predictor gives DW = 2.15 and changes the slope for the high from 1.66 to 1.44. Which of her results can she trust, which must change, and what should she report?
- Form first: the time-order plot drifts from −21.5 in March to positive from July, and adding the build-up term changes the temperature slope by −0.22 people per °F. Leaving the trend out was a specification error, so the model to report includes it.
- Spread: LM = 55.7 on 4 df gives a p-value below 0.001, and the residual SD rises from 14.6 on quiet days to 24.0 on busy ones. With the build-up included the test still gives LM = 67.8 on 5 df. The slopes are unbiased, but the ordinary standard errors are not to be trusted: report HC3 ones.
- With HC3 the festival coefficient’s SE rises from 9.1 to about 24.4 people; its t is still about 13.5, so the conclusion that festival days are far busier stands, with a much wider interval.
- Normality: one festival day at 4.66 and one ordinary day at 3.68 aside, the Q–Q plot is close to straight. With 306 days the coefficient tests are safe; prediction intervals for single days are not, because the spread varies.
- Dependence: with the build-up term, DW = 2.15, so neighbouring days are no longer alike in a way that matters.
Answer. Report the model with the build-up term (high: 1.44 people per °F) and HC3 standard errors. The coefficients and their tests survive; the constant-width prediction interval does not, because the spread grows with the fitted value.
What it means. The first two results Ana wanted come out differently. The temperature slope she would have quoted, 1.66, mixed the season with the café’s build-up. And a single prediction interval, ±2 × 16.5 people or so with the build-up term, is too wide for a cold Tuesday and too narrow for a warm Saturday. The next lesson’s log of footfall deals with the second problem.
Fictional figures
Millbrook’s manager wants to know how much a cold snap cuts weekday trade, to trim the roster in January. Ana fits Millbrook’s 306 days: footfall on the high, rain and a weekend dummy. The slope for the high is 0.89 people per °F. The residuals in date order average −41.2 in March, +7.0 in July and +27.7 in December, and DW = 1.03. With the build-up term added (0 at opening, 1 from 29 June), DW = 1.81 and the slope for the high is 0.45. What should Ana tell the manager?
- Read the time-order plot: the residuals climb by about 69 people from March to December, and DW = 1.03, well below 2. From March to July the café was building up its trade.
- Ask what that does to the temperature slope. Temperatures rose from March to July, just when the café was building up, so without a build-up term the slope for the high takes credit for the build-up and comes out too steep. That also explains why the residuals keep climbing after the build-up ended: as the autumn cools (from 83.5°F in July to 43.3°F in December on average), the too-steep slope predicts a larger fall in trade than happened, so the cold months sit above the line.
- Refit with the build-up term. DW rises to 1.81, and the slope for the high becomes 0.45 people per °F, holding the rain, the weekend and the build-up fixed. (A straight-line day count would overshoot the other way, to 1.17, because it assumes the build-up never stopped.)
- Turn it into the manager’s question: a January weekday 20°F colder than an October one goes with about 20 × 0.45 ≈ 9 fewer people, against about 18 on the slope without the build-up term.
Answer. About 0.45 fewer people per °F colder (holding rain, weekday and the build-up fixed): roughly 9 fewer for a 20°F colder weekday, half the 18 the model without the build-up implies.
What it means. The number the manager can roster from comes from the model that passed its checks. Ana should add a caveat: 2027 is the only winter in the log, and January is colder than any day the slope was fitted to, so the figure rests on one season and a modest extrapolation.
Explore
Common mistakes
“R² is 0.88, so the model is right.”
R² measures how much variation the model accounts for, not whether its form is right. The iced-share line has R² = 0.883 and residuals that trace a wave: it is too low on cold days and too high in the cool middle. Always plot the residuals.
“The residuals aren’t normal, so the regression is invalid.”
With hundreds of rows, the coefficient tests barely depend on normality. Non-normal errors matter for prediction intervals and for small samples. Check the Q–Q plot for a few extreme points (which deserve checking in the data) before worrying about the shape.
“Robust standard errors fix heteroskedasticity.”
HC3 standard errors repair the tests and intervals for coefficients. They leave the coefficients and the fitted values as they were, they don’t make a single prediction interval right for every row, and they can be smaller as well as larger than the ordinary ones (Harbourside’s rain SE fell from 5.75 to 4.35).
Running Durbin–Watson on rows in any order
The statistic compares each row with the row before it, so it only means something for one series in time order. On the café log as listed, alternating Harbourside and Millbrook, it compares two cafés on the same day. Sort by café and date first, or fit each café separately.
“Autocorrelation only affects the standard errors.”
True when the form is right; but residuals that drift are often a sign of a missing trend or season, and a missing predictor that goes with the others biases their slopes. Harbourside’s temperature slope changed from 1.66 to 1.44 when the build-up was added.
Treating a non-significant test as proof
A Breusch–Pagan or Durbin–Watson result that isn’t significant doesn’t show the condition holds, especially in a small sample, where the tests have little power. Judge the plot and the size of the problem, not only the p-value.
Guided practice
Work through these with hints when you need them. Every hint and every worked solution is there to be used.
Loading four questions…
On your own
No hints this time. Answer, check, and read the feedback; the solution appears once you have answered or if you ask for it. Your first answers count toward mastery.
Loading five questions…
In practice
Fictional case
Ana’s model note for the 2028 roster: “Harbourside footfall on high, rain, weekend, festival and the opening build-up (306 days, 2027). Checked: form (residuals against fitted and each predictor: no curve), time order (DW 2.15 with the build-up; without it the temperature slope is biased), spread (Breusch–Pagan LM = 67.8, 5 df, p < 0.001: busy days vary more, so HC3 standard errors reported), normality (Q–Q close to straight apart from 29 May and 16 October, both checked against the till). Not usable as it stands: a single ±33-person prediction interval for rostering. Next: refit footfall in logs.”
A note like this is what model validation looks like in practice. Banks, insurers and public bodies that rely on regression models usually have someone other than the model’s builder check it, and the checks are the ones in this lesson, done in a fixed order and written down: what was looked at, what was found, what was changed, and what the model should not be used for. The habit is useful far beyond regulated industries, because it turns “the model has an R² of 0.92” into a statement someone else can rely on.
The most useful line in such a note is often the last one: the use the model isn’t fit for. A footfall model with unbiased slopes and honest robust standard errors can support a statement about how much a warm day goes with, and still be the wrong tool for a prediction interval for one Saturday. Saying which is which saves a manager from rostering by an interval that is too narrow on exactly the days that matter.
Two judgements recur. The first is how large a departure has to be before it matters. A Breusch–Pagan test on 306 days can be significant for a modest change in spread; the question is whether it changes a decision, which you answer by comparing the ordinary and robust results, or the intervals, side by side. The second is when to stop. Every model of real data fails some check slightly; the aim is a model whose remaining failures are small, known and written down, not one that passes every test.
Knowledge check
Six questions, one attempt each, no hints. Score 80% or more to complete the lesson; you can take it again at any time.
Loading six questions…
Summary
- The linear model’s inference rests on four conditions about the errors: linearity (the right form), independence, normality and equal variance. The residuals are how you check them.
- Residuals against fitted values show the form (a curve, as in the iced share with R² = 0.883) and the spread (a funnel, as in Harbourside’s footfall).
- Unequal spread leaves the slopes unbiased but makes ordinary standard errors and a single prediction interval wrong; Breusch–Pagan tests for it (Harbourside: LM = 55.7, 4 df) and HC3 robust standard errors repair the coefficient tests.
- The normal Q–Q plot shows tails and skew; normality matters most for prediction intervals and small samples.
- Residuals in time order and the Durbin–Watson statistic (≈ 2(1 − r₁), near 2 is good) show dependence; Harbourside’s 1.55 came from a missing trend, and adding it moved the temperature slope from 1.66 to 1.44.
- Only a wrong form or a missing predictor biases the coefficients; the other failures make the model’s statements about its own precision wrong. Fix the form first, then the standard errors, and write down what the model shouldn’t be used for.
Key formulas
- Durbin–Watson statistic
- Lag-1 autocorrelation of residuals
- Breusch–Pagan test (Koenker’s form)
- HC3 robust covariance of the coefficients
- Normal scores for a Q–Q plot (Blom)
Terms introduced
- Heteroskedasticity
- Errors whose spread differs from row to row, typically growing with the fitted value; the opposite of homoskedasticity, a constant spread. It leaves least-squares slopes unbiased but makes the usual standard errors and prediction intervals wrong.
- Breusch–Pagan test
- A test of equal error variance: regress the squared residuals on the predictors and compare n × R² of that regression with a chi-square distribution on as many degrees of freedom as there are predictors.
- Robust standard error
- A standard error for a regression coefficient that stays valid when the error variance differs between rows, estimated from each row’s own squared residual; HC3 is a common version.
- Durbin–Watson statistic
- The sum of squared differences between successive residuals divided by the sum of squared residuals, for rows in time order. It runs from 0 to 4; near 2 means no first-order autocorrelation, well below 2 means neighbouring residuals are alike.
- Autocorrelation
- The correlation of a series with itself shifted by one or more periods; in regression, the tendency of residuals that are close in time to be alike.
Sources
- NIST/SEMATECH. e-Handbook of Statistical Methods, section 4.4.4, “How can I tell if a model fits my data?”. itl.nist.gov/div898/handbook/pmd/section4/pmd44.htm
- NIST/SEMATECH. e-Handbook of Statistical Methods, section 4.4.4.2, “How can I detect non-constant variation across the data?”. itl.nist.gov/div898/handbook/pmd/section4/pmd442.htm
- Holmes, A., Illowsky, B. & Dean, S. (2017). Introductory Business Statistics, section 13.4, “The Regression Equation” (the assumptions of the ordinary least squares model). OpenStax. openstax.org/books/introductory-business-statistics/pages/13…
- Penn State Eberly College of Science. STAT 501: Regression Methods, Lesson 4, “SLR Model Assumptions”. online.stat.psu.edu/stat501/lesson/4
- Penn State Eberly College of Science. STAT 501: Regression Methods, T.2.3, “Testing and Remedial Measures for Autocorrelation”. online.stat.psu.edu/stat501/book/export/html/998
