Frequency conversion for sample

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt

Katjes
Posts: 55
Joined: Thu Oct 02, 2008 5:46 am

Frequency conversion for sample

Postby Katjes » Wed Jan 22, 2014 2:14 am

I would like to convert a monthly series to a annual one, but selecting the conversion method for 1990-1995 average and for 1996 1996 the last value.
I do not select the conversion method the following code works for the average part, and it works.

Code: Select all

wfcreate(page=page1) m 1990 2010
series y=nrnd
pagecreate(page=page2) a 1990 2010
copy(smpl="1990 1995") page1\y page2\y
show y


If I try the last value procedure, the smpl is completly ignored and the whole series is copied to the annual sheet.

Code: Select all

wfcreate(page=page1) m 1990 2010
series y=nrnd
pagecreate(page=page2) a 1990 2010
copy(c=l,smpl="1996 1996") page1\y page2\y
show y


Now I decided to take a indirect way with a help series, but I maybe there is a more intuitive and less complicated way????

Code: Select all

wfcreate(page=page1) m 1990 2010
series y=nrnd
pagecreate(page=page2) a 1990 2010
copy(smpl="1990 1995") page1\y page2\y
copy(c=l) page1\y page2\y1 'genr a help series y1
pageselect page2
smpl 1996 1996
y=y1
delete y1
smpl @all
show y

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 12416
Joined: Tue Sep 16, 2008 5:38 pm

Re: Frequency conversion for sample

Postby EViews Gareth » Wed Jan 22, 2014 8:52 am

The smpl option of the copy command only works when you're performing a match-merge copy, not a dated copy.
Follow us on Twitter @IHSEViews


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 40 guests