Dated Panel

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

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

stefanp
Posts: 63
Joined: Wed Sep 30, 2015 12:24 am

Dated Panel

Postby stefanp » Thu Feb 11, 2016 4:22 am

Hey guys,

I have a data panel workfile with x oberservations in t periods. I would like to add dummies for cross sections (region, sector). There combined in one identifier re_se

I dont know how to tell Eviews to generate dummies for all sectors in a region, e.g. re1_se1, re1_se2.

So far, I have

Code: Select all

if ident= %rr
where %rr stands for all regions. However, i need to specify that the conditions holds for all values after re (i.e. _se1,_se2...). How do i implement this?

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

Re: Dated Panel

Postby EViews Gareth » Thu Feb 11, 2016 8:21 am

You'll have to describe the issue a bit more - it isn't clear how the data are currently structured. Perhaps post your workfile.

stefanp
Posts: 63
Joined: Wed Sep 30, 2015 12:24 am

Re: Dated Panel

Postby stefanp » Tue Feb 16, 2016 12:52 am

As already pointed out, there are two identifiers in my dataset.

One identifier is country (country), e.g. UK, FR, DK etc. In The other identifier is sector (sector). Let me call the sectors for the sake of simplicity AA, BB, CC etc.
I can either use the two identifiers or merge them into one.

In the former case, I can refer to the identifiers in a loop as follows:

for %KK UK FR DK
genr c_{%kk}=0
next

and proceed separately for the sector identifier.

However, I dont know how to code the problem in case of one identifier (e.g. UK_AA, UK_BB, FR_AA).
Something like
for %KK UK FR DK
for %JJ AA BB CC
genr c_{%KK_%JJ}=0
next
next

Does not work. Any ideas?

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

Re: Dated Panel

Postby EViews Gareth » Tue Feb 16, 2016 1:13 am

Code: Select all

genr c_{%KK}_{%JJ}=0

stefanp
Posts: 63
Joined: Wed Sep 30, 2015 12:24 am

Re: Dated Panel

Postby stefanp » Tue Feb 16, 2016 9:36 am

That was quick, thanks.

Code: Select all

for %KK UK FR DK for %JJ AA BB CC genr c_{%KK}_{%JJ}=0 next next
-->works
I would like to proceed as follows:

Code: Select all

for %KK UK FR DK for %JJ AA BB CC genr c_{%KK}_{%JJ}=0 smpl @all if ident={%JJ}_{%KK} next next
However, I end up with an error UK_AA is not defined in "SMPL @ALL IF IDENT=BW_AA". The series "ident" contains the identifier (e.g. "UK_AA") at each point in time.

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

Re: Dated Panel

Postby EViews Gareth » Tue Feb 16, 2016 1:43 pm

Code: Select all

for %KK UK FR DK for %JJ AA BB CC genr c_{%KK}_{%JJ}=0 %ident = %jj + "_" + %kk smpl @all if ident=%ident next next


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests