generate trend for dummy
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
Re: generate trend for dummy
can you hepl me Mr Gareth.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: generate trend for dummy
I still don't follow what you're trying to do.
Re: generate trend for dummy
sorry! this is my workfile, i hope that you understand me what i mean. just i would to generate trend and dummy for different frequency.
it's very important for me Mr Gareth.
many thanks in advance.
it's very important for me Mr Gareth.
many thanks in advance.
- Attachments
-
- sales3.WF1
- (209.4 KiB) Downloaded 337 times
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: generate trend for dummy
Still not clear.
Re: generate trend for dummy
see the picture
- Attachments
-
- weekday
- weekday_3.png (13.35 KiB) Viewed 9285 times
-
- daily
- daily_2.png (16.61 KiB) Viewed 9285 times
-
- interday
- intraday_1.png (15.06 KiB) Viewed 9285 times
Last edited by ch2324 on Thu Oct 30, 2014 12:17 pm, edited 2 times in total.
Re: generate trend for dummy
and this
- Attachments
-
- fortnight
- fortnight_5.png (19.12 KiB) Viewed 9287 times
-
- tenday
- tenday_4.png (14.41 KiB) Viewed 9287 times
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: generate trend for dummy
Showing pictures isn't asking a question...
But I think at least one of your columns is just the @month variable.
But I think at least one of your columns is just the @month variable.
Re: generate trend for dummy
question: generate trend and dummy for different frequency.
1-interday:
genr trend (t1): from 03/01/2000 08:00 to 03/01/2000 10:00 take 1
from 04/01/2000 08:00 to 04/01/2000 10:00 take 2. and so on
genr trend (2): from 03/01/2000 08:00 to 03/01/2000 10:00 take 1 2 3 4 5.
from 04/01/2000 08:00 to 04/01/2000 10:00 take 1 2 3 4 5. and son on
genr dum1: the first 03/01/2000 08:00 and the last 03/01/2000 10:00 take 1
the first 04/01/20000 08:00 and the last 04/01/2000 10:00 take 1. and so on
2-daily
genr trend (t3): the first month take 1, the second month take 2, the third month take 3...etc
genr trend (t4): the first month take 1 2 3...29, the second month take 1 2 3...29, the third month take 1 2 3...31,...and son on
3-weekday
genr trend (t5): the first month take 1 next month take 2 and so on
genr trend (t6): the first month take 1 2 3...5, the second month take 1...4, and son on.
4-tenday
genr trend (t7): the first month take 1 next month take 2 and so on
genr trend (t8): the first month take 1 2 3 next month take 1 2 3 and so on
genr dum2: the first tenday and the last take 1 for every month.
5-fortnight
genr trend (t9): the first month take 1 next month take 2 and so on
genr trend (t10): the first month take 1 2 3 next month take 1 2 and so on
genr dum3: the first and last fortnight take 1 for every months.
1-interday:
genr trend (t1): from 03/01/2000 08:00 to 03/01/2000 10:00 take 1
from 04/01/2000 08:00 to 04/01/2000 10:00 take 2. and so on
genr trend (2): from 03/01/2000 08:00 to 03/01/2000 10:00 take 1 2 3 4 5.
from 04/01/2000 08:00 to 04/01/2000 10:00 take 1 2 3 4 5. and son on
genr dum1: the first 03/01/2000 08:00 and the last 03/01/2000 10:00 take 1
the first 04/01/20000 08:00 and the last 04/01/2000 10:00 take 1. and so on
2-daily
genr trend (t3): the first month take 1, the second month take 2, the third month take 3...etc
genr trend (t4): the first month take 1 2 3...29, the second month take 1 2 3...29, the third month take 1 2 3...31,...and son on
3-weekday
genr trend (t5): the first month take 1 next month take 2 and so on
genr trend (t6): the first month take 1 2 3...5, the second month take 1...4, and son on.
4-tenday
genr trend (t7): the first month take 1 next month take 2 and so on
genr trend (t8): the first month take 1 2 3 next month take 1 2 3 and so on
genr dum2: the first tenday and the last take 1 for every month.
5-fortnight
genr trend (t9): the first month take 1 next month take 2 and so on
genr trend (t10): the first month take 1 2 3 next month take 1 2 and so on
genr dum3: the first and last fortnight take 1 for every months.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: generate trend for dummy
A few of these will have issues at the start of the workfile, but:
1-Interday:
2-daily:
3-weekday:
That should get you doing, anyway
1-Interday:
Code: Select all
series dum1 = @datepart(@date, "ddd")-3
series dum2 = @recode(@day<>@day(-1), 1, dum2(-1)+1)
series dum3 = @recode(@day<>@day(-1) or @day<>@day(1), 1, 0)
Code: Select all
series dum1=@month
series dum2 = @day
Code: Select all
series dum1= @month
series dum2= @recode(@month<>@month(-1), 1, dum(-1)+1)
That should get you doing, anyway
Re: generate trend for dummy
problem
1-inraday:
the code for dum1 generate trend for the first year, it not continue for the second year 2001 it repeat.
2-daily:
same problem for the code dum1 (and same problem for fortnight & tenday)
3-weekday:
A- same problem for the code dum1 (and same problem for fortnight & tenday)
B- when i une the code for dum2 it chow error message '' dum is not defined "
4- when i use the code for dum2 (tenday & fortnight) it not generate trend for example: frequency tenday
11/01/2000 take 11 it should equal 2.
21/01/2000 take 21 it should equal 3.
1-inraday:
the code for dum1 generate trend for the first year, it not continue for the second year 2001 it repeat.
Code: Select all
series dum1 = @datepart(@date, "ddd")-3 same problem for the code dum1 (and same problem for fortnight & tenday)
Code: Select all
series dum1=@monthA- same problem for the code dum1 (and same problem for fortnight & tenday)
Code: Select all
series dum1=@monthCode: Select all
series dum2= @recode(@month<>@month(-1), 1, dum(-1)+1)11/01/2000 take 11 it should equal 2.
21/01/2000 take 21 it should equal 3.
Code: Select all
series dum2 = @day- Attachments
-
- dum2222.png (55.6 KiB) Viewed 9246 times
-
- dum11111.png (81.43 KiB) Viewed 9246 times
Re: generate trend for dummy
can you help me Mr Gareth.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: generate trend for dummy
Code: Select all
series dum1=@cumsum(@recode(@datefloor(@date,"d")<>@datefloor(@date(-1) ,"d"),1,0))
Re: generate trend for dummy
thanks a lot,
this code for dummy chow error message
what can i do. 
this code for dummy chow error message
Code: Select all
series dum2= @recode(@month<>@month(-1), 1, dum(-1)+1)- Attachments
-
- dummy2.png (37.35 KiB) Viewed 9210 times
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: generate trend for dummy
series dum2= @recode(@month<>@month(-1), 1, dum2(-1)+1)
Re: generate trend for dummy
thanks for your help. :D
Who is online
Users browsing this forum: No registered users and 2 guests
