Page 1 of 1

String with first and last observation?

Posted: Fri Dec 02, 2016 12:59 am
by tvonbrasch
Hi

I want to make an annual workpage starting in the first year of the quarterly workpage and ending in the last year of the same quarterly workpage.

The following code works:

Code: Select all

genr _auxyear=@year 'lager hjelpeserie %first = @left(_auxyear.@first,4) %last = @left(_auxyear.@last,4) pagecreate(page=a) a {%first} {%last}
but is not efficient. How can this be done in a better way (without creating the auxiliary series)?
Thomas

Re: String with first and last observation?

Posted: Fri Dec 02, 2016 5:59 am
by EViews Gareth
You can create an annual page specifying the dates including quarters, so, if you can do something as simple as:

Code: Select all

smpl @all %dates = @pagesmpl pagecreate a {%dates}

Re: String with first and last observation?

Posted: Sat Dec 03, 2016 11:20 am
by tvonbrasch
Perfect, thank you Gareth!
Thomas