How to write one statement with arguments as a sample

For questions regarding programming in the EViews programming language.

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

SAMCYR
Posts: 4
Joined: Wed Jun 09, 2010 6:24 am

How to write one statement with arguments as a sample

Postby SAMCYR » Wed Feb 15, 2012 8:24 am

Dear all,

I would like to write only one statement instead of creating 2 string variables to define the sample to be used in order to calculate the mean for the last observation of gdp (series) and 2 lags:
It should be like this but returns an error: Illegal date

show @mean(gdp, @otod(@ilast(gdp(2))) @otod(@ilast(gdp)))

Thanks in advance

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

Re: How to write one statement with arguments as a sample

Postby EViews Gareth » Wed Feb 15, 2012 8:44 am

Probably can't be done - I think you'll have to use two string variables.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests