Page 1 of 1

@pc(x) function does not work

Posted: Thu Nov 21, 2013 10:44 pm
by johnvaz@gmail.com
I using Eviews 8, and am trying to get the average absolute percentage change of a series
!AAPC = @mean(@abs(@pc(_yhat)))

and I get an error
@PC is an illegal or reserved name in "!AAPC = @MEAN(@ABS(@PC(_YHAT)))


or

for mean absolute error

!MAE = @sum(@abs( _yer)))/!h
!MAE is not defined or is an illegal command in "!MAE = @SUM(@ABS( _YER)))/13"
Is there something I am missing

Re: @pc(x) function does not work

Posted: Fri Nov 22, 2013 12:27 pm
by EViews Glenn
The @pc function only works for series destinations, not program variable or matrix destinations. You could generate a series with the values on the RHS of your expression, then grab the value using the @min, @max, @mean, etc.

Code: Select all

series temppc = @mean(@abs(@pc(_yhat))) !AAPC = @mean(temppc)
As to the other error, are you typing this in the command window or is this included in a program file that you are running?

Re: @pc(x) function does not work

Posted: Sun Nov 24, 2013 6:07 am
by johnvaz@gmail.com
I was trying to run this code in a program not on command line

Re: @pc(x) function does not work

Posted: Sun Nov 24, 2013 8:15 am
by EViews Gareth
For the last error, you have a syntax error - two open parens and three close parens.