Hello,
I use irregular daily data and have a large list of "blip" i.e. 0001000 dummy variables.
I have two questions:
1. How can I retrieve the date when such a dummy variable is 1.
2. How can I create a trend (shift) variable such that for the "blip" dummy 0001000 I obtain a trend shift variable "0001234"
Thank you and best regards
Benja
(I use Eviews 8 )
Retrieve Date String from Dummy Variables & Make Trend
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13600
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Retrieve Date String from Dummy Variables & Make Trend
Find the date:
Make the trend shift:
Code: Select all
smpl if dum1 = 1
string mydate = @otods(1)
Code: Select all
smpl {mydate} @last
series dum2 = @trend - @dtoo(mydate)
Re: Retrieve Date String from Dummy Variables & Make Trend
Thank you for the fast response. Unfortunately the last line returns this error message : "@DTOO is not a Genr or series expression function in "SERIES DUM2 = @TREND - @DTOO(MYDATE)"". I am not sure what to make of it. Maybe the date format is not appropriate? My date-variable "date" is formated like this:
1/02/2008 2008-01-02
1/03/2008 2008-01-03
1/04/2008 2008-01-04
1/07/2008 2008-01-07
1/08/2008 2008-01-08
Accordingly, the string variable mydate contains e.g. 5/01/2008 for my first blip dummy.
Thanks for helping!
1/02/2008 2008-01-02
1/03/2008 2008-01-03
1/04/2008 2008-01-04
1/07/2008 2008-01-07
1/08/2008 2008-01-08
Accordingly, the string variable mydate contains e.g. 5/01/2008 for my first blip dummy.
Thanks for helping!
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13600
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Retrieve Date String from Dummy Variables & Make Trend
Code: Select all
!val = @dtoo(mydate)
series dum2 = @trend-!val
Who is online
Users browsing this forum: No registered users and 2 guests
