Page 1 of 1

Generate change variables by group

Posted: Mon Aug 22, 2016 2:32 pm
by Lottamob
I have a stacked data set that is not a panel set, containing variables for several countries over several years.

How do I generate a series of change variables (x/x(-1)-1) while avoiding having the last variable for one county being combined with the first variable of another country? In other words, how do I generate series by group?
/Lotta

Re: Generate change variables by group

Posted: Mon Aug 22, 2016 2:44 pm
by startz
You might be able to set the smpl to include only the desired observations. Otherwise, since it's not a panel, how would EViews know which observations to include? Another possibility is to restructure into a panel, generate your new variable, and then turn it back into unstructured.

Re: Generate change variables by group

Posted: Tue Aug 23, 2016 1:00 pm
by Lottamob
Thank you for your response.
It seems eviews should be able to know as I can run regressions per country with the code:
group gr1 @expand(country)
ls rer c tfp5 gr1

I understand that when I do so, I am just creating dummy variables for the countries. Still, it would seems that eviews could be asked also to generate a series per country or another group, or in other way be asked to drop the first observation per group. Generating growth variables for a stacked data set seems like suck a common thing to do that the programmers would have figured out a way.

Thanks,
Lotta