generate date
Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt
generate date
I ask this question because EViews can not suport this frequency by four month.
1/i have workfile with two page with monthly frequency 1998m01 2010m12 (156 obs), and undated (156/4)=39 obs, how can generate date by every four month in the page unstructured (30/04/1998, 31/08/1998,....), or by simple question how can moved the the undated page to import just this date and make the mean of my series salaries by every 4 month.
30/04/1998
31/08/1998
31/12/1998
30/04/1999
31/08/1999
31/12/1999
....
31/12/2010
2/ it is possibale the generate date weeks in undated page: 02/01/1998, 09/01/1998, 16/01/1998,....
3/I have no seen in all software a frequency "by four month (1/3)" it's possible to include a new frequency by every fourth month (One third of the year 1/3) with function @thirdly, it is very nice to analyse some data economics with several frequency.
Thank you for what you realize for us.
1/i have workfile with two page with monthly frequency 1998m01 2010m12 (156 obs), and undated (156/4)=39 obs, how can generate date by every four month in the page unstructured (30/04/1998, 31/08/1998,....), or by simple question how can moved the the undated page to import just this date and make the mean of my series salaries by every 4 month.
30/04/1998
31/08/1998
31/12/1998
30/04/1999
31/08/1999
31/12/1999
....
31/12/2010
2/ it is possibale the generate date weeks in undated page: 02/01/1998, 09/01/1998, 16/01/1998,....
3/I have no seen in all software a frequency "by four month (1/3)" it's possible to include a new frequency by every fourth month (One third of the year 1/3) with function @thirdly, it is very nice to analyse some data economics with several frequency.
Thank you for what you realize for us.
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13319
- Joined: Tue Sep 16, 2008 5:38 pm
Re: generate date
1) On the monthly page create a series equal to @floor(@trend/4). On the undated page create a series equal to @trend. Then do a general match merge based on those series.
2) Something like:
2) Something like:
Code: Select all
smpl @first @first
series weeks = @dateval("02/01/1998")
smpl @first+1 @last
weeks = @dateadd(weeks(-1), 1,"w")
Follow us on Twitter @IHSEViews
Re: generate date
1/ perfect thanks!
2/ for weeks ok!, but for month i get this: 30/08/1998, 30/12/1998, Aug and Dec have 31 days not 30
smpl @first @first
series months = @dateval("30/04/1998")
smpl @first+1 @last
months = @dateadd(months(-1), 4,"m")
2/ for weeks ok!, but for month i get this: 30/08/1998, 30/12/1998, Aug and Dec have 31 days not 30
smpl @first @first
series months = @dateval("30/04/1998")
smpl @first+1 @last
months = @dateadd(months(-1), 4,"m")
Re: generate date
When i do a general match merge, my series date will be like this in page undated: 1998-02-15 00:00, 1998-06-16 00:00, 1998-10-16 12:00, 1999-02-15 00:00.... but i need this:
30/04/1998
31/08/1998
31/12/1998
30/04/1999
....
31/12/2010
or 1998m04, 1998m08, 1998m12....
30/04/1998
31/08/1998
31/12/1998
30/04/1999
....
31/12/2010
or 1998m04, 1998m08, 1998m12....
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13319
- Joined: Tue Sep 16, 2008 5:38 pm
Re: generate date
metrix wrote:1/ perfect thanks!
2/ for weeks ok!, but for month i get this: 30/08/1998, 30/12/1998, Aug and Dec have 31 days not 30
smpl @first @first
series months = @dateval("30/04/1998")
smpl @first+1 @last
months = @dateadd(months(-1), 4,"m")
So?
Follow us on Twitter @IHSEViews
Re: generate date
i get this with the code: 30/08/1998, 30/12/1998...., Aug and Dec have 31 days not 30.
how can modifiend this.
how can modifiend this.
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13319
- Joined: Tue Sep 16, 2008 5:38 pm
Re: generate date
You told EViews to add a month to a date. The 30th of July plus a month is the 30th of August.
The 15th of a month plus a month is the 15th of the next month, whether or not the months have 30 days or 31 days.
The 15th of a month plus a month is the 15th of the next month, whether or not the months have 30 days or 31 days.
Follow us on Twitter @IHSEViews
Re: generate date
Emmm , how can import just the last date by four month from my page frequency monthly.
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13319
- Joined: Tue Sep 16, 2008 5:38 pm
Re: generate date
You can find the date of the last day of the current month by adding a month (using @dateadd), getting the date floor (@datefloor) to give you the first date of the next month, then subtracting one.
Follow us on Twitter @IHSEViews
Re: generate date
i have use this: but i get not the date
series f=@date<=@datefloor(@date,"m")+1 or @dateadd(@datefloor(@date,"m"),3,"m")
series f=@date<=@datefloor(@date,"m")+1 or @dateadd(@datefloor(@date,"m"),3,"m")
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13319
- Joined: Tue Sep 16, 2008 5:38 pm
Re: generate date
if i use series f=@datefloor(@date,"m") it generate all date, inequality is to use just the 1998m04 1998m08 1998m12... in the series, I don't know how.
Re: generate date
How can solve my case? by @dateadd and @datefloor
Re: generate date
i have use this Mr Gareth:
could you help me.
Code: Select all
series f=@dateadd(@datefloor(@date,"m"),3,"m")
could you help me.
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13319
- Joined: Tue Sep 16, 2008 5:38 pm
Who is online
Users browsing this forum: No registered users and 47 guests