summing multiple series

For questions regarding programming in the EViews programming language.

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

Etienne Wijler
Posts: 10
Joined: Mon Nov 17, 2014 1:48 pm

summing multiple series

Postby Etienne Wijler » Sat Jan 10, 2015 12:00 pm

Hello all,

I have a question that seems very simple in nature, but I can't seem to find the right command despite my search efforts. At the moment I have a number of forecasts generated in a loop and weighted them according some function of the MSE (not important). I now want to create a new series that is equal to the sum of the seperate weighted forecasts.

Code: Select all

series f5_var56_!i = series_5_0 series f5sqe_var56_!i = (series_5_0 - series_5)^2 series f5_weighted_MSE_!i = f5_var56_!i * MSE_5(!i,3) series f5_combined_MSE = @sum(f5_weighted_MSE_!i)
The problem here is in the fourth line. The series f5_combined_MSE contains the same incorrect constant over all observations, while if I write the sum out myself the resulting series is correct. It's probably just a wrong command used here, but I can't find the right one. Hopefully some of you can help me out.

Kind regards,

Etienne

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

Re: summing multiple series

Postby EViews Gareth » Sat Jan 10, 2015 3:36 pm

Put them into a group, then use the @rsum function


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests