Page 1 of 1
@rlasti(g) function
Posted: Wed Apr 10, 2013 6:09 am
by farrel
Guys,
I wondering what is the object should be for @rlasti(g) function? I want to find row-wise last non-NA index in a group ....
How this function has to be used?
Andrei
Re: @rlasti(g) function
Posted: Wed Apr 10, 2013 7:53 am
by EViews Gareth
That function returns a series, giving the last observation for which all series in the group have data. There is no function that returns a group with the individual last observations.
Re: @rlasti(g) function
Posted: Thu Apr 11, 2013 5:24 am
by farrel
aha, ok.
Would you mind please to correct a code below so that @rlasti(g) would work? Sorry, I cannot grasp an idea how to implement it.
Code: Select all
close wf
create wf u 1 10
smpl 1 6
series y =@rnd
smpl 1 8
series x =@rnd
smpl @all
group gr_xy x y
series obs = @rlasti(gr_xy)
Andrei
Re: @rlasti(g) function
Posted: Thu Apr 11, 2013 7:37 am
by EViews Gareth
Sorry, I completely misspoke. It gives the index of the last column for which has a value. Thus for the following data:
Code: Select all
X Y Z
1 3 1
3 2 4
1 5 NA
2 NA NA
NA NA 1
It would give:
Re: @rlasti(g) function
Posted: Thu Apr 11, 2013 10:36 am
by farrel
thanks for an example, but I was thinking how technically did you obtain index in Eviews??
Could you share please programming code calculating index using @rlasti(g) function??
Andrei
Re: @rlasti(g) function
Posted: Thu Apr 11, 2013 10:41 am
by EViews Gareth
Code: Select all
create u 5
series x
x.fill 1, 3, 1, 2, na
series y
y.fill 3, 2, 5, na, na
series z
z.fill 1, 4, na, na, 1
group g x y z
show @rilast(g)
Re: @rlasti(g) function
Posted: Thu Apr 11, 2013 11:10 am
by farrel
I feel myself very stupid, but I have no idea how to store it as series in workfile....
what kind of object it is?
Re: @rlasti(g) function
Posted: Thu Apr 11, 2013 11:14 am
by EViews Gareth
It is a series...
Code: Select all
create u 5
series x
x.fill 1, 3, 1, 2, na
series y
y.fill 3, 2, 5, na, na
series z
z.fill 1, 4, na, na, 1
group g x y z
series a = @rilast(g)
Re: @rlasti(g) function
Posted: Thu Apr 11, 2013 11:24 am
by farrel
FINALLY!!!!!!!!!!
Now I see what's the problem.
Manual says that this is function called @rlasti(g), but in reality it is @rilast(g)
i letter jumping over the function name ...
No, I still not so stupid
Re: @rlasti(g) function
Posted: Thu Apr 11, 2013 1:00 pm
by EViews Glenn
Sorry, we'll get that fixed.
Re: @rlasti(g) function
Posted: Fri Apr 12, 2013 12:24 am
by farrel
I was noticing once or two inconsistencies in Eviews Manual before.
Do we have a particular topic in forum for that?
Andrei
Re: @rlasti(g) function
Posted: Fri Apr 12, 2013 4:04 am
by EViews Gareth
We view them as bugs, so they can go there.