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.
Lagged residuals
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3797
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Lagged residuals
if the residuals are in a variable named "e," then the lagged residuals are "e(-1)."
Re: Lagged residuals
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.
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.
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3797
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Lagged residuals
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
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.
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.
- Attachments
-
- residuals.WF1
- (22.59 KiB) Downloaded 666 times
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3797
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Lagged residuals
Make a plot connecting the dots. Note that there tend to be long runs of either positive or negative residuals.
Re: Lagged residuals
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. :)
Do you think there is autocorrelation then as I cannot really see it.
Thank you so much for your time and patience. :)
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3797
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Lagged residuals
If you've saved the residuals in the series e, then open that series and choose graph from the View menu.
Who is online
Users browsing this forum: No registered users and 2 guests
