@mean and @sum

For notifying us of what you believe are bugs or errors in EViews.
Please ensure your copy of EViews is up-to-date before posting.

Moderators: EViews Gareth, EViews Moderator

paues
Posts: 169
Joined: Fri Apr 15, 2011 7:16 am
Location: Stockholm, Sweden

@mean and @sum

Postby paues » Tue Aug 06, 2013 7:21 am

While it is possible to specify a sample period for when using @mean and @sum to calculate a series (below)...

Code: Select all

series mySeries=1
series tmp2=@sum(mySeries,"2005 2005")
series tmp2=@mean(mySeries,"2005 2005")
... it does not seem to be possible to do so when calculating a control variable or a scalar.

Code: Select all

!tmp3=@sum(mySeries,"2005 2005")
!tmp4=@mean(mySeries,"2005 2005")
scalar tmp5=@sum(mySeries,"2005 2005")
scalar tmp6=@mean(mySeries,"2005 2005")


I am using EViews 8 Enterprise Edition (Aug 1 2013 build).

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

Re: @mean and @sum

Postby EViews Gareth » Tue Aug 06, 2013 8:00 am

That's correct, and not really a bug so much as a missing feature :D
Follow us on Twitter @IHSEViews

paues
Posts: 169
Joined: Fri Apr 15, 2011 7:16 am
Location: Stockholm, Sweden

Re: @mean and @sum

Postby paues » Tue Aug 06, 2013 8:39 am

Even though I see your point :D , the command reference specifies that @mean and @sum take a sample as their second argument. Is the feature coming up? (While it is easy to code by oneself it would be very helpful.)

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

Re: @mean and @sum

Postby EViews Gareth » Tue Aug 06, 2013 8:49 am

Doubtful. There are two expression evaluaters in EViews, those that return series and those that return matrix/scalars. The two are completely separate. The first understands about samples, the other (since matrices/scalars don't depend on workfile structure) does not. For a similar reason you can't do:

Code: Select all

scalar p = @max(@movav(x,2))

but you can do:

Code: Select all

series p = @max(@movav(x,2))

because the series evaluater understands @movav, but the matrix one doesn't.

Yes this is unfortunate. Yes it is a pain. Yes we should fix it. Unfortunately it requires re-writing most of EViews :(
Follow us on Twitter @IHSEViews


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 11 guests