Exclude specify country in the panel data

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator

Candy1
Posts: 8
Joined: Thu Jan 18, 2018 8:23 pm

Exclude specify country in the panel data

Postby Candy1 » Thu Jan 18, 2018 8:42 pm

I am new to the Eviews and working on my graduate thesis. Please help to give me some suggestion regarding the following problem.
I am working on a unbalanced panel data with 197 banks, and the data period is 2011-2016. As the banks' headquarters are located in different country, may I know how to exclude specific country for the regression?
Thank you very much for your reply in advance.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13294
Joined: Tue Sep 16, 2008 5:38 pm

Re: Exclude specify country in the panel data

Postby EViews Gareth » Thu Jan 18, 2018 8:48 pm

Code: Select all

smpl if country<>"USA"
Follow us on Twitter @IHSEViews

Candy1
Posts: 8
Joined: Thu Jan 18, 2018 8:23 pm

Re: Exclude specify country in the panel data

Postby Candy1 » Fri Jan 19, 2018 12:01 am

Thanks for your reply. May I know if the code (smpl if country<>"USA" ) just type at the end of the equation? As I got an error message (SMPL is not defined) after I key in this code at the end.
Thank you.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13294
Joined: Tue Sep 16, 2008 5:38 pm

Re: Exclude specify country in the panel data

Postby EViews Gareth » Fri Jan 19, 2018 8:26 am

Either enter it as is in the EViews command window prior to doing the estimation, or remove the "smpl" part and enter it in the Equation's estimation sample box.
Follow us on Twitter @IHSEViews

Candy1
Posts: 8
Joined: Thu Jan 18, 2018 8:23 pm

Re: Exclude specify country in the panel data

Postby Candy1 » Sat Jan 20, 2018 7:04 am

Hi Gareth,

Thank you very much. Now I face another problem, I got an error message "Near singular matrix". I search that it is due to dummy variable trap, and I should drop one dummy variable, but I am not sure how to drop. Dose it means I should exclude two countries at the same time? If yes, what should I enter? Is it smpl if country<>"USA""CHINA"?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13294
Joined: Tue Sep 16, 2008 5:38 pm

Re: Exclude specify country in the panel data

Postby EViews Gareth » Sat Jan 20, 2018 12:33 pm

Code: Select all

smpl if country<>"USA" and country<>"CHINA"
Follow us on Twitter @IHSEViews

Candy1
Posts: 8
Joined: Thu Jan 18, 2018 8:23 pm

Re: Exclude specify country in the panel data

Postby Candy1 » Mon Jan 22, 2018 6:32 am

Hi Gareth,

Thank you very much!

awatt43
Posts: 20
Joined: Mon Aug 21, 2017 12:19 am

Re: Exclude specify country in the panel data

Postby awatt43 » Mon Oct 05, 2020 6:21 am

Along the same vein so posting here. I am estimating a 2SLS panel model using lags of the endogenous variables as instruments. I have the sample period 2002 to 2016, so when estimating the sample is automatically adjusted by EViews to 2003-2016 to account for the lagged instruments.

If I drop a cross section using this method "smpl 2002 2016 if @crossid<>29", dropping the 29th cross section, the sample period in the reported regression is 2002 2016 and not 2003? How can this be? Is the sample still adjusted for the lagged instruments in the regression with dropped cross section and the reported regression just doesn't show this?

Thanks
Abi

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13294
Joined: Tue Sep 16, 2008 5:38 pm

Re: Exclude specify country in the panel data

Postby EViews Gareth » Mon Oct 05, 2020 7:32 am

It is still adjusted
Follow us on Twitter @IHSEViews


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 8 guests