Hi, I hope someone can help me figure out how to read the attached graph I produced in EViews. I have a panel data set with 59 cross sections over a 16 year period.
1) How should I read this graph? Mainly, there is no time axis in the graph, so I am not sure how to interpret it. Are the residuals averaged over the time period? It appears the numbers might be for a particular year, but how can I know that?
2) I am trying to produce a scatter plot of the residuals from a panel regression, where I would have the residuals on one axis and time on another, for a selected set of 10 cross sections (the residuals plot with all 59 cross sections is very difficult to read). Is there a way to do this?
Thanks for help!
Residuals plot from a panel regression
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
-
ecardamone
- Posts: 40
- Joined: Wed Sep 17, 2014 12:23 pm
Residuals plot from a panel regression
- Attachments
-
- graph_resids01.pdf
- (85.14 KiB) Downloaded 1671 times
-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: Residuals plot from a panel regression
How did you produce this graph?
-
ecardamone
- Posts: 40
- Joined: Wed Sep 17, 2014 12:23 pm
Re: Residuals plot from a panel regression
Good question. I run my regression, then I open the results of the equation estimation. In the equation estimation tool bar (not sure if that is the appropriate language) I click on the 'Resids' tab. Then I right click on the very messy plot of residuals, and select 'Options...', and then under 'Basic graph type' I select 'Scatter'. That gives me the graph in question.
-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: Residuals plot from a panel regression
You are plotting a scatterplot of the residuals on the bottom axis, against the actual dependent variable and the fitted value of the dependent variable on the left-hand axis.
-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: Residuals plot from a panel regression
For what you want to do:
1. From the equation, click on Proc/Make Residual Series... Enter a name. Click on OK to create the series.
2. Go to the command line and set a subsample of the 10 cross-sections you want to look at using the smpl command:
or some equivalent. You can use your cross-section identifier variable in place of the "@crossid".
3. Open the newly created residual series. Click on View/Graph.... Leave the graph type at Line & Symbol. In the Panel Options in the bottom right select Individual cross-sections. Click on OK.
1. From the equation, click on Proc/Make Residual Series... Enter a name. Click on OK to create the series.
2. Go to the command line and set a subsample of the 10 cross-sections you want to look at using the smpl command:
Code: Select all
smpl if @inlist(@crossid, "1 2 5 7 9 12 15")
3. Open the newly created residual series. Click on View/Graph.... Leave the graph type at Line & Symbol. In the Panel Options in the bottom right select Individual cross-sections. Click on OK.
-
ecardamone
- Posts: 40
- Joined: Wed Sep 17, 2014 12:23 pm
Re: Residuals plot from a panel regression
Thanks so much for help!
I need a little more help. My cross-section identifier for each cross-section contains two words - actually, it's a combination of numbers and words with a space between. For example, I have a cross-section identifier "111A Agriculture" and
"318 Semiconductor". How do I use these identifiers in the code below so that EViews recognizes "111A Agriculture" as a cross-section identifier ? The problem is the space within each identifier. I hope this makes sense.
Thanks again!
I need a little more help. My cross-section identifier for each cross-section contains two words - actually, it's a combination of numbers and words with a space between. For example, I have a cross-section identifier "111A Agriculture" and
"318 Semiconductor". How do I use these identifiers in the code below so that EViews recognizes "111A Agriculture" as a cross-section identifier ? The problem is the space within each identifier. I hope this makes sense.
Thanks again!
Code: Select all
smpl if @inlist(@crossid, "1 2 5 7 9 12 15")-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: Residuals plot from a panel regression
I'm not sure but I don't think it's easy in the @inlist function.
If I were you, I'd just create a new series with the values of the cross-section identifiers appropriately modified and work with that. Something like
where A was the original identifier series will give you "_" instead of the spaces.
If I were you, I'd just create a new series with the values of the cross-section identifiers appropriately modified and work with that. Something like
Code: Select all
alpha g = @replace(a, " ", "_")-
ecardamone
- Posts: 40
- Joined: Wed Sep 17, 2014 12:23 pm
Re: Residuals plot from a panel regression
Oh great. Thank you! I was thinking along those lines, but I wasn't sure how to do it. This is awesome. Thanks, again!
Who is online
Users browsing this forum: No registered users and 2 guests
