average across series

Use this forum to post questions about syntax problems or general programming issues. Questions on implementing a particular aspect of econometrics should go in "Econometrics Issues" below.
potiv
Posts: 10
Joined: Fri Sep 04, 2009 6:26 am

average across series

Unread post by potiv »

Dear Tom,
One task that I always struggle with is the computation of the average across series. The need for doing this arises, for example, in forecast combination applications. In that context, I have a set of forecasts that I have previously generated (a set of series, perhaps organized in a vector of series) and I want to calculate the equally weighted average forecast (i.e., the series with each entry equal to the average entry of the set of series).
Any help would be very much appreciated.
Best regards,
Valerio
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: average across series

Unread post by TomDoan »

If they're a VECT[SERIES], it's very easy.

set avgs = %avg(%xt(myvectseries,t))
potiv
Posts: 10
Joined: Fri Sep 04, 2009 6:26 am

Re: average across series

Unread post by potiv »

Many thanks Tom.
Post Reply