@elem (specific observation value) for panel data

For questions regarding programming in the EViews programming language.

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

aradziwill
Posts: 9
Joined: Wed Jan 13, 2010 7:41 am

@elem (specific observation value) for panel data

Postby aradziwill » Mon Jan 25, 2010 3:15 am

Hello,

I would like to extract the specific observation valur (for a given cross-section for a given year) for the variable from the panel data workfile.
How can I do it? @elem command does not work and I cannot find any substitute command for panels. I am pretty sure there must be an easy way around it

I use e-views 6

Many thanks,
Artur

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

Re: @elem (specific observation value) for panel data

Postby EViews Gareth » Mon Jan 25, 2010 8:34 am

Unfortunately, and surprisingly, there isn't an easy way to do it. I usually do something like setting the sample to be the one observation you want, then setting my scalar equal to the maximum of the series (since the maximum of a single value is just that single value!). Something along the lines of:

Code: Select all

smpl 1990 1990 if @crossid=3 scalar p = @max(x)
Which sets P equal to the value of X in year 1990 for cross-section 3.

aradziwill
Posts: 9
Joined: Wed Jan 13, 2010 7:41 am

Re: @elem (specific observation value) for panel data

Postby aradziwill » Mon Jan 25, 2010 10:45 am

Thanks a lot, this works very well, although the lack of such command is indeed surprising
Artur


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests