Page 1 of 1

Exclude specify country in the panel data

Posted: Thu Jan 18, 2018 8:42 pm
by Candy1
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.

Re: Exclude specify country in the panel data

Posted: Thu Jan 18, 2018 8:48 pm
by EViews Gareth

Code: Select all

smpl if country<>"USA"

Re: Exclude specify country in the panel data

Posted: Fri Jan 19, 2018 12:01 am
by Candy1
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.

Re: Exclude specify country in the panel data

Posted: Fri Jan 19, 2018 8:26 am
by EViews Gareth
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.

Re: Exclude specify country in the panel data

Posted: Sat Jan 20, 2018 7:04 am
by Candy1
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"?

Re: Exclude specify country in the panel data

Posted: Sat Jan 20, 2018 12:33 pm
by EViews Gareth

Code: Select all

smpl if country<>"USA" and country<>"CHINA"

Re: Exclude specify country in the panel data

Posted: Mon Jan 22, 2018 6:32 am
by Candy1
Hi Gareth,

Thank you very much!

Re: Exclude specify country in the panel data

Posted: Mon Oct 05, 2020 6:21 am
by awatt43
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

Re: Exclude specify country in the panel data

Posted: Mon Oct 05, 2020 7:32 am
by EViews Gareth
It is still adjusted