Vlookup in EViews

For questions regarding programming in the EViews programming language.

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

benlambert18785
Posts: 9
Joined: Tue Sep 18, 2012 8:19 am

Vlookup in EViews

Postby benlambert18785 » Mon Mar 04, 2013 5:04 am

Hi,

I would like to do the following: Lookup a number within a matrix/series. If that number is contained within that series I would then do something, if it is not I would do something else.

Is there a way to do this in EViews?

Thanks,

Ben

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

Re: Vlookup in EViews

Postby EViews Gareth » Mon Mar 04, 2013 8:35 am

In a series:

Code: Select all

smpl if X=0.05 if @obssmpl>0 then 'do stuff endif
i.e. set the sample to every observation for which X is equal to 0.05. Then count the number of observations in the sample (obssmpl), and if it is greater than 0, do something.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests