Hello,
I have a dated weekly series that I want to link to an undated page where each series contains data only for one specific year.
The data I have in weekly page:
1/02/2010 -1.22
1/09/2010 -0.24
1/16/2010 -0.25
1/23/2010 -0.27
.
.
.
1/01/2011 2.93
1/08/2011 4.92
1/15/2011 3.90
1/22/2011 3.89
.
.
And I want to link them to an undated page with 2 series:
data_2010 data_2011
-1.22 2.93
-0.24 4.92
-0.25 3.90
-0.27 3.89
. .
. .
Does anybody know how do I set a link to special paste the data? Thanks a lot!
How to link data from dated page to undated page?
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: How to link data from dated page to undated page?
What are the observations in the undated page? How do you wish to match the observations in the undated with the observations in the dated?
Re: How to link data from dated page to undated page?
Basically, in undated page I'd like to create several series with each series for one year, i.e. undated page should have 53 (53 weeks in some years) observations, and each series corresponds to one year in dated page. Each observation in a series/year should link to the week number of that specific year in dated pages. Thanks!
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: How to link data from dated page to undated page?
Doing it with a copy is complicated. Easier to do it with a page unstack.
Create two new series in your weekly page containing the week number and the year number:
Then use Proc->Reshape Current Page->Unstack in New Page, and enter "yearnum" in the first box, and "weeknum" in the second, and hit ok.
Create two new series in your weekly page containing the week number and the year number:
Code: Select all
series weeknum = @datepart(@date, "ww")
series yearnum = @year
Re: How to link data from dated page to undated page?
Thank you, Gareth! This works well, but I have one concern. Since I need to update weekly page every week and do analysis in the undated page, if I create a new page every time, I will have to re-do the analysis. Is there any other way to directly link the data in weekly pages to the undated page? Thanks a lot!
Doing it with a copy is complicated. Easier to do it with a page unstack.
Create two new series in your weekly page containing the week number and the year number:Then use Proc->Reshape Current Page->Unstack in New Page, and enter "yearnum" in the first box, and "weeknum" in the second, and hit ok.Code: Select all
series weeknum = @datepart(@date, "ww") series yearnum = @year
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: How to link data from dated page to undated page?
Code: Select all
create(page=full) w 1990 2000
series weeknum = @datepart(@date, "ww")
series y=nrnd
pagecreate(page=weeks) u 53
series weeknum = @trend+1
for !i=1990 to 2000
link y_{!i}
%smplspec = "if @year = " + @str(!i)
y_{!i}.linkto(smpl=%smplspec) full\y weeknum weeknum
next
Re: How to link data from dated page to undated page?
Thank you so much! That works perfectly!
Code: Select all
create(page=full) w 1990 2000 series weeknum = @datepart(@date, "ww") series y=nrnd pagecreate(page=weeks) u 53 series weeknum = @trend+1 for !i=1990 to 2000 link y_{!i} %smplspec = "if @year = " + @str(!i) y_{!i}.linkto(smpl=%smplspec) full\y weeknum weeknum next
Who is online
Users browsing this forum: No registered users and 2 guests
