Eviews program of panel model with certain features

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

mvandijk
Posts: 3
Joined: Thu Oct 03, 2013 7:00 am

Eviews program of panel model with certain features

Postby mvandijk » Thu Oct 03, 2013 7:16 am

Dear Eviews team,

I want to estimate panel models based on 186 countries and 40 years. Since I have many dependent variables, I am using Eviews programs in Eviews 7.

I currently estimate panel models with country fixed-effects and a time trend in my Eviews programs as follows:
equation dep_y.ls(cx=f) y x1 x2 x3 @obsid

I now want to add four additional features:
* a country-specific time trend instead of one "global" time trend
* standard errors clustered by country
* year fixed effects
* I also want to weight observations by the GDP of the country, if possible

I would greatly appreciate any help on how to do this.

Thank you very much in advance!

Matt

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

Re: Eviews program of panel model with certain features

Postby EViews Gareth » Thu Oct 03, 2013 11:55 am

Code: Select all

@expand(@crossid)*@obsid
That will do the country-specific trend coefficient.

Code: Select all

.ls(cx=f, per=f) y x1 x2 ....
is the option for period effects.

Code: Select all

.ls(cx=f, per=f, cov=whiteper)
gives clustered SEs

mvandijk
Posts: 3
Joined: Thu Oct 03, 2013 7:00 am

Re: Eviews program of panel model with certain features

Postby mvandijk » Thu Oct 03, 2013 12:55 pm

Dear Eviews Gareth,

This is most helpful, thank you very much.

When I use @expand(@crossid)*@obsid, however, I always get "Near Singular Matrix" as an error message. Any idea what is going on?

And would you know how to do the GDP weighting?

Thanks again,
Mathijs

mvandijk
Posts: 3
Joined: Thu Oct 03, 2013 7:00 am

Re: Eviews program of panel model with certain features

Postby mvandijk » Thu Oct 03, 2013 1:31 pm

I have another follow-up question. I have now rerun my program with "ls(cx=f, per=f, cov=whiteper)" instead of "ls(cx=f)" as you recommended.

However, when I subsequently look at the "Panel Options" in the equations the program then generates in the Eviews workfile, I see that now indeed both cross-section and period fixed effects are included, but the Coef covariance method is still "Ordinary" instead of "White period".

Somehow the program does not use standard errors clustered by country, apparently.

What am I doing wrong?

Many thanks,
Matt

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: Eviews program of panel model with certain features

Postby EViews Glenn » Thu Oct 03, 2013 5:25 pm

Sorry, "wgt=perwhite". My fault, not Gareth's. I should know better than to trust my memory.

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: Eviews program of panel model with certain features

Postby EViews Glenn » Fri Oct 04, 2013 9:10 am

Oh, and I think we want

@expand(crossid)*@trend


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests