Page 1 of 1

first value

Posted: Tue Aug 30, 2016 11:47 am
by trainee
When setting sample is there a way to have the sample start when the series starts?

For instance, instead of writing "smpl 1989Q2 2016Q3" after having checked the series start date, I would like to write a code that checks the series start date itself.

Please let me know if I'm not clear.

Thanks for your help.

Trainee

Re: first value

Posted: Tue Aug 30, 2016 11:53 am
by EViews Gareth
In one line:

Code: Select all

smpl @first 2016q3 if @date >= @dateval(X.@first)
Personally I would probably do something like this though:

Code: Select all

%first = x.@first smpl {%first} 2016q3
which is a bit easier to read.

Note neither will be dynamic - the sample will not automatically adjust if the series start date changes.