I am trying to figure out whether from the following graph of the OLS residuals that the linear relationship does not hold, and that probably a cubic relationship would do better? Since both in the beginning as in the middle the variance is larger, and two bends in a regression could lower the variance for these areas. Or is that something that is not determinable from this graph?

enter image description here

[edit after comments]

The mean structure does suggest a quadratic term, and possibly a cubic term, however this last one seems small.

enter image description here

  • $\begingroup$ Why not just test a cubic model and see if the quadratic and cubic terms are large and/or significant? $\endgroup$ – Peter Flom May 10 '13 at 19:40
  • $\begingroup$ Thanks, I did test them, and they are significant, but not large. Just wanted to know if it is ok to justify the fact I added them in the first place, because the variance structure suggests this. $\endgroup$ – Marloes May 10 '13 at 20:00
  • $\begingroup$ I would read this plot as showing the variance of the residuals does not appreciably change over time. As a rule of thumb, variances of small- to medium-sized datasets (such as are used in the local windows in the Loess algorithm) can be expected to vary randomly by a factor of two to three up and down. Although the fall from 5 down to 2 during the first half hour looks almost significant, I suspect it is a characteristic "edge effect" from the Loess smooth coupled with sparse data during the first 10 minutes or so. This variance structure does not suggest adding more terms to the model. $\endgroup$ – whuber May 10 '13 at 20:02
  • $\begingroup$ Thanks. I do have theoretical grounds to add a quadratic term though. And this also shows up in the mean structure (see edit to question). But I probably won't be adding the cubic term. $\endgroup$ – Marloes May 10 '13 at 20:18
  • 1
    $\begingroup$ The mean structure does not suggest either a cubic or quadratic term: they could not accurately reproduce what is shown. There are several ways it could be handled: allow the slope to change discontinuously at an unknown point (that adds two parameters) or add a (decaying) exponential term, which also needs two parameters. If you want to anticipate the outcome, eyeball the break (it's around $3/4$) and introduce a variable equal to time before the break and zero after the break. Although this doesn't account for uncertainty in estimating the break, it will show you a better fit. $\endgroup$ – whuber May 10 '13 at 22:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.