Page 1 of 1

starting date in the middle of a time series

Posted: Thu Dec 10, 2015 7:57 am
by Ynwe
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?

Re: starting date in the middle of a time series

Posted: Thu Dec 10, 2015 8:14 am
by EViews Gareth
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)

Re: starting date in the middle of a time series

Posted: Thu Dec 10, 2015 9:58 am
by Ynwe
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?

Re: starting date in the middle of a time series

Posted: Thu Dec 10, 2015 10:05 am
by EViews Gareth
Just type that command into the EViews command window

Re: starting date in the middle of a time series

Posted: Thu Dec 10, 2015 2:35 pm
by Ynwe
whoops, this is what you get whenn you always minimize the command window. thank you very much!