Page 1 of 1

Lagged residuals

Posted: Sun Jul 24, 2011 3:50 am
by pepareja
EViews 6
Hello,
I would like to obtain a scatter plot of current OLS residuals against residuals lagged one period. I do have the current residuals saved from OLS regression. How do I create a lagged residual please? Do I need to estimate first the AR(1) model?

Thank you.

Re: Lagged residuals

Posted: Sun Jul 24, 2011 7:58 am
by startz
if the residuals are in a variable named "e," then the lagged residuals are "e(-1)."

Re: Lagged residuals

Posted: Tue Jul 26, 2011 7:20 am
by pepareja
Hi, thank you for reply. Yes that's what I thought but I am getting a syntax error message.
I am new to EViews so could you maybe guide me step by step? I uploaded the data, estimated OLS equation and thus have series resid created. I believe I need to save it first (not sure how) and lets say I name it e. How do I create e(-1) ... lagged residuals? I tried by estimate by equation, generate series etc but had no success.
Thanks a lot.

Re: Lagged residuals

Posted: Tue Jul 26, 2011 7:51 am
by startz
After a regression, EViews automatically stores the residuals in a series named resid. So to run a regression, save the residuals, and regress residuals on lagged residuals you could go

Code: Select all

ls y c x series e=resid ls e e(-1)

Re: Lagged residuals

Posted: Wed Jul 27, 2011 7:43 am
by pepareja
Thank you very much, I think I managed now. I still have a query though as you can see in my attachment.
There is an obvious autocorrelation when residuals are lagged against each other however when OLS resid is plotted against time - I don't see any correlation at all. I think I am doing something wrong.

Re: Lagged residuals

Posted: Wed Jul 27, 2011 7:56 am
by startz
Make a plot connecting the dots. Note that there tend to be long runs of either positive or negative residuals.

Re: Lagged residuals

Posted: Wed Jul 27, 2011 8:15 am
by pepareja
I don't really know how to connect the dots in the plot. I usually do it with the scatter graph 'fit regression line' however on this one there is no such option...
Do you think there is autocorrelation then as I cannot really see it.
Thank you so much for your time and patience. :)

Re: Lagged residuals

Posted: Wed Jul 27, 2011 8:32 am
by startz
If you've saved the residuals in the series e, then open that series and choose graph from the View menu.