## How to code for putting average MAE from rolling forecast into table

For questions regarding programming in the EViews programming language.

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

chairake
Posts: 9
Joined: Fri Nov 30, 2018 9:31 pm

### How to code for putting average MAE from rolling forecast into table

Hi,

I have problem to put average MAE from rolling forecast into table
because of type of scalar, matrix and string problem.
I would like to know how to code them.

Attachments
make table (1).prg
make table.wf1
make table.jpg (324.84 KiB) Viewed 1157 times
Last edited by chairake on Sun Dec 16, 2018 11:09 pm, edited 1 time in total.

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

### Re: How to code for putting average MAE from rolling forecast into table

Easiest way for you is probably to just add the numbers and divide (i.e. calculate the mean manually).

chairake
Posts: 9
Joined: Fri Nov 30, 2018 9:31 pm

### Re: How to code for putting average MAE from rolling forecast into table

Thank you for your reply EViews Gareth but I have ever try

by @sum(.......)/7
zresult_{%n}(10,2) = @sum(@mae({%n}_r{!m}f,{%n}))/7

but the program tell the error that

Scalar sent to function which operates on a matrix in
"ZRESULT_{%N}(10,2) = @SUM(@MAE(BMIX_E_R1F,BMIX_E))/7".

Because i don't understand truly about type of object and how to manage them.
How can I solve the problem.

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

### Re: How to code for putting average MAE from rolling forecast into table

Just use + rather than a function.