Function @elem() for panel data.
Posted: Fri Feb 22, 2013 3:21 am
Hi,
if working with panel data, I would like to transform a series to index, with value of one year as a base.
Assuming a panel with T=20 observations (dated from 1991 to 2010), and K=30 cross-sections, and I would like to use the value of T=15, to generate something like this:
So, how should I address the elements of series in panel data workfile?
(even if I limit my sample to one crossid, and try to generate or , it says "Date does not uniquely define observations in panels"... - which is indeed true, so how should I address the observations uniquely?)
if working with panel data, I would like to transform a series to index, with value of one year as a base.
Assuming a panel with T=20 observations (dated from 1991 to 2010), and K=30 cross-sections, and I would like to use the value of T=15, to generate something like this:
Code: Select all
series index1= 100*series1/@elem(series1, 15) (even if I limit my sample to one crossid, and try to generate
Code: Select all
scalar abc =@elem(series1, 15)Code: Select all
scalar abc =@elem(series1, "2005")