Refering to a panel observation

For questions regarding programming in the EViews programming language.

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

Eppichgyo
Posts: 11
Joined: Mon Mar 18, 2019 11:17 am

Refering to a panel observation

Postby Eppichgyo » Tue Jun 11, 2019 8:04 am

Dear Experts,

I have a dated, annual panel file. The cross section ideintifier is called id, the date is dateid. Eviews acknowledges the structure as dated panel, if I click on range. I would like to refer to specific observations, e.g. dateid = 2007 id =1 observation of a variable, for example to drop out outliers (outisde+/2sigma). I have read that @crossid, @cellid, @dateid functions should work. But if i try to run e.g. this part, Eviews says: @CROSSID is an illegal or reserved name in "IF @CROSSID=1 AND @DATEID=2007 THEN".


My code part

!h = @mean(l_totasset)+@stdev(l_totasset)
!l = @mean(l_totasset)-@stdev(l_totasset)

for !i = 1 to 246
for !j = 2007 to 2017
if @crossid=!i and @dateid=!j then
l_totasset_wo =@recode(l_totasset>!h or l_totasset<!l,na,l_totasset)

endif

next
next

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

Re: Refering to a panel observation

Postby EViews Gareth » Tue Jun 11, 2019 11:00 am

Follow us on Twitter @IHSEViews


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 19 guests