I have an unbalanced panel workfile setup with data across 18 sections for ~50 years. I'd like to run cross sectional and time series estimations with the data on this file for select years and individuals. I'm quite sure there is some way to manipulate the samples in either the set sample window or restructuring the workfile, but I'm not familiar with these features and want to make sure that I am working with the data that I think I am — it also saves the time of rebuilding separate workfiles
Of concern to me is missing values for a handful of variables for particular years. Is there some IF command for setting samples that would allow me to draw values from a particular year, or one year before if N/A? Would it also be possible for me to run estimations restricted to just a single individual (coid)?
I am using the student version of EViews 7 (and also have more variables than I can save)
Standard xsectional & time series estimations from panel?
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: Standard xsectional & time series estimations from panel
Yes you can set samples in that way using the "smpl if" with an if condition at the end. The documentation describes this in some detail, and there are posts on this form as well. For example, if you only want to estimate for a single cross-section, you can set the sample to only that cross-section by entering
in the command window (where ID is your identifier and 10 is the value that you want). Note that EViews will handle NA values automatically so if that is your only concern, you probably need not do anything at all. EViews will generally find the observations for a computation that can be used.
Code: Select all
smpl if id=10Re: Standard xsectional & time series estimations from panel
Thank you for your response, Glenn. Sample manipulation turns out to be much easier than I thought!
Now, trying running an OLS with the sample year restricted to just one period still estimates using panel least squares. This means I don't have access to typical testing tools such as the LM test, et al. Is there any way to have EViews acknowledge the fact that while I am working out of a panel workfile, I am not taking advantage of the panel nature of the data and would therefore like to run them as nonpanel xsectional/time series equations?
Now, trying running an OLS with the sample year restricted to just one period still estimates using panel least squares. This means I don't have access to typical testing tools such as the LM test, et al. Is there any way to have EViews acknowledge the fact that while I am working out of a panel workfile, I am not taking advantage of the panel nature of the data and would therefore like to run them as nonpanel xsectional/time series equations?
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3798
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Standard xsectional & time series estimations from panel
You can always remove the panel structure using proc/restructure.
Re: Standard xsectional & time series estimations from panel
Perfect...just one concern: will this affect my data structure and make cross-sectional estimations difficult, or will EViews still recognize the id's I have set for each individual? Can I revert back to a panel model without complications thereafter?
Thank you very much for your responses
Thank you very much for your responses
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3798
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Standard xsectional & time series estimations from panel
1. Make a COPY!!!! If you have the data set the way you want it, don't mess with the original.
2. In EViews the smpl if command works on any variable, so if doesn't really matter what the cross-section identifier is. For example,
2. In EViews the smpl if command works on any variable, so if doesn't really matter what the cross-section identifier is. For example,
Code: Select all
smpl if weirdVariable = 3.14
-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: Standard xsectional & time series estimations from panel
The one problem with removing the panel structure is that you'll have to be careful about lags as EViews won't know that they don't cross seams between cross-sections.
Otherwise, you can always just extract data to a single cross-section page by clicking on the new page tab in the bottom of the workfile and choosing Copy/Extract from current page. You can even do it by link so that data in the panel page that change will get updated in the individual cross-section page. If you don't have a lot of cross-sections, you can even use this to create a page for each cross-section value.
Otherwise, you can always just extract data to a single cross-section page by clicking on the new page tab in the bottom of the workfile and choosing Copy/Extract from current page. You can even do it by link so that data in the panel page that change will get updated in the individual cross-section page. If you don't have a lot of cross-sections, you can even use this to create a page for each cross-section value.
Who is online
Users browsing this forum: No registered users and 2 guests
