Generate an index variable

For requesting general information about EViews, sharing your own tips and tricks, and information on EViews training or guides.

Moderators: EViews Gareth, EViews Moderator

Pantera
Posts: 44
Joined: Mon Dec 21, 2009 5:32 am

Generate an index variable

Postby Pantera » Mon Oct 24, 2011 3:06 am

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.

trubador
Did you use forum search?
Posts: 1520
Joined: Thu Nov 20, 2008 12:04 pm

Re: Generate an index variable

Postby trubador » Mon Oct 24, 2011 3:58 am

Code: Select all

series t = @trend+1
or

Code: Select all

series t = @obsid

Pantera
Posts: 44
Joined: Mon Dec 21, 2009 5:32 am

Re: Generate an index variable

Postby Pantera » Mon Oct 24, 2011 5:29 am

Thank Trubador - it works perfectly!

P.


Return to “General Information and Tips and Tricks”

Who is online

Users browsing this forum: No registered users and 2 guests