@rlasti(g) function

For questions regarding programming in the EViews programming language.

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

farrel
Posts: 111
Joined: Thu Sep 18, 2008 11:13 pm

@rlasti(g) function

Postby farrel » Wed Apr 10, 2013 6:09 am

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

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

Re: @rlasti(g) function

Postby EViews Gareth » Wed Apr 10, 2013 7:53 am

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.

farrel
Posts: 111
Joined: Thu Sep 18, 2008 11:13 pm

Re: @rlasti(g) function

Postby farrel » Thu Apr 11, 2013 5:24 am

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

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

Re: @rlasti(g) function

Postby EViews Gareth » Thu Apr 11, 2013 7:37 am

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:

Code: Select all

3 3 2 1 3

farrel
Posts: 111
Joined: Thu Sep 18, 2008 11:13 pm

Re: @rlasti(g) function

Postby farrel » Thu Apr 11, 2013 10:36 am

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

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

Re: @rlasti(g) function

Postby EViews Gareth » Thu Apr 11, 2013 10:41 am

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)

farrel
Posts: 111
Joined: Thu Sep 18, 2008 11:13 pm

Re: @rlasti(g) function

Postby farrel » Thu Apr 11, 2013 11:10 am

I feel myself very stupid, but I have no idea how to store it as series in workfile....
what kind of object it is?

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

Re: @rlasti(g) function

Postby EViews Gareth » Thu Apr 11, 2013 11:14 am

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)

farrel
Posts: 111
Joined: Thu Sep 18, 2008 11:13 pm

Re: @rlasti(g) function

Postby farrel » Thu Apr 11, 2013 11:24 am

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

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: @rlasti(g) function

Postby EViews Glenn » Thu Apr 11, 2013 1:00 pm

Sorry, we'll get that fixed.

farrel
Posts: 111
Joined: Thu Sep 18, 2008 11:13 pm

Re: @rlasti(g) function

Postby farrel » Fri Apr 12, 2013 12:24 am

I was noticing once or two inconsistencies in Eviews Manual before.
Do we have a particular topic in forum for that?

Andrei

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

Re: @rlasti(g) function

Postby EViews Gareth » Fri Apr 12, 2013 4:04 am

We view them as bugs, so they can go there.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests