starting date in the middle of a time series

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

Moderators: EViews Gareth, EViews Moderator

Ynwe
Posts: 22
Joined: Tue Dec 08, 2015 4:39 am

starting date in the middle of a time series

Postby Ynwe » Thu Dec 10, 2015 7:57 am

Hey! I have a time series going from 1980-2013. One of the variables should have a starting point in 1988. Its basically a law change. So the variable should be "X years since Law Y was passed" How would I put that into eviews? Just leave he 1980-87 years as NA, and than the rest just begin counting up?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13323
Joined: Tue Sep 16, 2008 5:38 pm

Re: starting date in the middle of a time series

Postby EViews Gareth » Thu Dec 10, 2015 8:14 am

If you want the pre-1988 years to be NA, then yes, enter them as NA.

To create such a series you can use:

Code: Select all

series yrssince88 = @recode(@year>1987, @year-1988, na)
Follow us on Twitter @IHSEViews

Ynwe
Posts: 22
Joined: Tue Dec 08, 2015 4:39 am

Re: starting date in the middle of a time series

Postby Ynwe » Thu Dec 10, 2015 9:58 am

EViews Gareth wrote:If you want the pre-1988 years to be NA, then yes, enter them as NA.

To create such a series you can use:

Code: Select all

series yrssince88 = @recode(@year>1987, @year-1988, na)


wait, never coded in Eviews. I go to object create a new object and call it time, where do I enter that code than?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13323
Joined: Tue Sep 16, 2008 5:38 pm

Re: starting date in the middle of a time series

Postby EViews Gareth » Thu Dec 10, 2015 10:05 am

Just type that command into the EViews command window
Follow us on Twitter @IHSEViews

Ynwe
Posts: 22
Joined: Tue Dec 08, 2015 4:39 am

Re: starting date in the middle of a time series

Postby Ynwe » Thu Dec 10, 2015 2:35 pm

whoops, this is what you get whenn you always minimize the command window. thank you very much!


Return to “General Information and Tips and Tricks”

Who is online

Users browsing this forum: No registered users and 5 guests