Page 1 of 1

@ifirst and @ilast with panel data - how to obtain the respective @crossid

Posted: Mon Jun 25, 2018 5:21 am
by mamo
Dear Eviews team,

I use Eviews 10, Mar 2018 build,

Assume x being series in a panel data workfile
@ifirst(x) or @ilast(x) give the @cellid associated with the of the first or last non-missing value of x
Is there a way to obtain also the respective @crossid ?

Best,
mamo

Re: @ifirst and @ilast with panel data - how to obtain the respective @crossid

Posted: Mon Jun 25, 2018 7:13 am
by EViews Gareth
I don't believe there is in one line.

Re: @ifirst and @ilast with panel data - how to obtain the respective @crossid

Posted: Mon Jun 25, 2018 9:07 am
by EViews Matt
I believe the long way around is something like,

Code: Select all

series tmp = @crossid scalar ci = tmp(@ifirst(x))

Re: @ifirst and @ilast with panel data - how to obtain the respective @crossid

Posted: Mon Jun 25, 2018 9:43 am
by mamo
This works, many thanks;
btw, @ifirst(x) provides the @obsid - not the @crossid as I wrote - associated with the of the first or last non-missing value of x.

Code: Select all

scalar obsid = @ifirst(x) series tmp=@crossid scalar crossid = tmp(@ifirst(x)) series tmp=@cellid scalar cellid = tmp(@ifirst(x))
Best,
mamo