panel - difference

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

tvonbrasch
Posts: 462
Joined: Fri Apr 15, 2011 5:35 am

panel - difference

Postby tvonbrasch » Tue May 11, 2021 9:49 pm

Hi,

I am not used to working with panel pages. I want to create a series where I take the difference between a variable and a particular cross section of that variable. In a pool-setting, this can be done by defining the reference cross section !ref and then using the command:

Code: Select all

   id.genr x_? = x_?-x_{!ref}

where id is the pool identifier. How can I do a similar operation in a panel workfile?
t

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

Re: panel - difference

Postby EViews Gareth » Wed May 12, 2021 8:15 am

Probably easier ways, but I think this works:

Code: Select all

x-@maxsby(x, @date, "if @crossid=1")


Where replace the @crossid=1 bit by whatever cross-section you want to minus.
Follow us on Twitter @IHSEViews

tvonbrasch
Posts: 462
Joined: Fri Apr 15, 2011 5:35 am

Re: panel - difference

Postby tvonbrasch » Thu May 13, 2021 7:57 am

great, thanks!
t

Ingrid1
Posts: 1
Joined: Mon Sep 13, 2021 5:22 am

Re: panel - difference

Postby Ingrid1 » Tue Sep 14, 2021 2:48 am

Since this is panel data are you using fixed effects or random effects or is this simply OLS?

If you are just using OLS it is possible that your estimates will turn out biased.


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 18 guests