Page 1 of 1

Dated Panel

Posted: Thu Feb 11, 2016 4:22 am
by stefanp
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?

Re: Dated Panel

Posted: Thu Feb 11, 2016 8:21 am
by EViews Gareth
You'll have to describe the issue a bit more - it isn't clear how the data are currently structured. Perhaps post your workfile.

Re: Dated Panel

Posted: Tue Feb 16, 2016 12:52 am
by stefanp
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?

Re: Dated Panel

Posted: Tue Feb 16, 2016 1:13 am
by EViews Gareth

Code: Select all

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

Re: Dated Panel

Posted: Tue Feb 16, 2016 9:36 am
by stefanp
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.

Re: Dated Panel

Posted: Tue Feb 16, 2016 1:43 pm
by EViews Gareth

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