Page 1 of 1

Weird series index

Posted: Sat Apr 06, 2013 11:59 am
by farrel
Dear Eviews guys,

Would you mind to shed a light on a observation index, which confuses me.
Here an example:

Code: Select all

create u 1 10 smpl 5 10 series y = 5 smpl @all scalar obs = @ifirst(y) ' first non-missing observation index, supposedly to be = 5 series x(obs) = 3 ' I want x = 3 to be on 5th observation, but it appears on 6th!!! why is that???

Why series x starts from 6th observation but not 5th as any logic would suggest??
And one more thing. Why line "x(obs) = 3" writes from 6th observation and onwards rather than to appear solely on 6th (or 5th) observation?

Andrei

Re: Weird series index

Posted: Sat Apr 06, 2013 12:15 pm
by EViews Gareth

Code: Select all

Series x(5) = 3
Means create a series called X then set the 5 period lead of that series equal to 3.

In the same way that X(-1) is the one period lag, X(1) is the one period lead.

Re: Weird series index

Posted: Sun Apr 07, 2013 3:44 am
by farrel
ooh yea, of course. Thank you. stupid me

But what would be convenient way to set 5th observation x=3 in this example?? I mean without manipulating WF sample?

I tried to play around @isperiod, but failed to insert scalar, since it allows only strings..

Re: Weird series index

Posted: Sun Apr 07, 2013 5:06 am
by EViews Gareth
For somewhat craze reasons,

Code: Select all

Series x X(5)=3

Probably works.