Unit specific time averages

For requesting general information about EViews, sharing your own tips and tricks, and information on EViews training or guides.

Moderators: EViews Gareth, EViews Moderator

AngieL
Posts: 17
Joined: Tue Aug 09, 2016 8:17 am

Unit specific time averages

Postby AngieL » Fri Aug 19, 2016 7:53 am

Hi,

Does someone know how to do unit-specific time averages for panel data on Eviews?

Thanks,
Angie

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

Re: Unit specific time averages

Postby EViews Gareth » Fri Aug 19, 2016 8:01 am

You probably want the @meansby function with the date series as the by parameter.
Follow us on Twitter @IHSEViews

AngieL
Posts: 17
Joined: Tue Aug 09, 2016 8:17 am

Re: Unit specific time averages

Postby AngieL » Fri Aug 19, 2016 8:14 am

And how do I do that? Could you please explain that with steps cause I am new to panel data?

AngieL
Posts: 17
Joined: Tue Aug 09, 2016 8:17 am

Re: Unit specific time averages

Postby AngieL » Fri Aug 19, 2016 8:26 am

Can I also ask something else is there a way that I can make the random effect used instead of the fixed effects (so it passes the Hausman test), because random effects is the method to be used for my data?
Last edited by AngieL on Fri Aug 19, 2016 10:12 am, edited 1 time in total.

AngieL
Posts: 17
Joined: Tue Aug 09, 2016 8:17 am

Re: Unit specific time averages

Postby AngieL » Fri Aug 19, 2016 8:42 am

This is what I am trying to do on eviews but I can not seem to find the way to do it :

There are two ways of rescuing a random effects approach under correlation between the country specific error and the regressors. One is to do the Hausman-Taylor IV estimation but for that we would have to come up with possible instruments that are not correlated with ai, which does not seem an easy task. In this paper we will opt for a different approach that consists on modelling the error term ai. This approach, described in Wooldridge (2002), is usually applied when estimating non-linear models, as IV estimation proves to be a Herculean task but, as we shall see, the application to our case
is quite successful. The idea is to give an explicit expression for the correlation between the error and the regressors, stating that the expected value of the country specific error is a linear combination of time-averages of the regressors X i . This follows Hajivassiliou and Ioannides (2006) and Hajivassiliou (2006).
( i | it , i ) i E a X Z = η X . (2)
If we modify our initial equation (1), with i t i a =η X +ε we get
Xi it it i i it R = β X +λ Z +η +ε +μ , (3)
where εi is an error term by definition uncorrelated with the regressors. In practical terms, we eliminate the problem by including a time-average of the explanatory variables as additional time-invariant regressors.

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

Re: Unit specific time averages

Postby EViews Glenn » Fri Aug 19, 2016 11:31 am

Code: Select all

series ymean = @meansby(y, @crossid)

computes, for each cross-section, the mean of Y taken across all of the time-periods and assigns that value to each observation in the cross-section.


Return to “General Information and Tips and Tricks”

Who is online

Users browsing this forum: No registered users and 1 guest