Page 1 of 1

Generate an index variable

Posted: Mon Oct 24, 2011 3:06 am
by Pantera
Hi all,
I have a column of 53 observations (time series, yearly data). I want to generate a time index: 1 for the first observation, 2 for the second,.... and 53 for the last one. Any suggestion how I generate that kind of variable?

P.

Re: Generate an index variable

Posted: Mon Oct 24, 2011 3:58 am
by trubador

Code: Select all

series t = @trend+1
or

Code: Select all

series t = @obsid

Re: Generate an index variable

Posted: Mon Oct 24, 2011 5:29 am
by Pantera
Thank Trubador - it works perfectly!

P.