# Multiple forecasts to add up to 100%

I am trying to model and forecast an industrial process, in which the agent has to choose the percentage to attribute to four products, which I will call y1, y2, y3 and y4.

They add up to 100% in the data, and must add to 100% in the forecast.

I have the four time series y1 to y4, and two explicative series for each one, so the system goes (in R code):

y1 ~ x1a + x1b
y2 ~ x2a + x2b
with sum (y1...y4) = 1


...and so on

Each xn* is uncorrelated with the others.

Regressing each y on his xs, I obtain meaningful relationships, but of course there is a simultaneity problem, as the agent's choice for each y depends on the other y, as increasing one goes at the expense of the other, since all yn must sum up to 100%.

I am using a Simultaneous Equations Model, which is fine for descriptive purposes.

The problem is, how can I forecast the four ys, based on my model, so that it satisfies the following constraint?

sum(y1...y4) = 1


Any help appreciated

• Why would such a requirement be necessary? How do these forecasts relate? A forecast is not a probability. – Michael R. Chernick May 25 '17 at 17:43
• They are not probabilities. The agent chooses how to split the "cake", according to the exogenous variables. – vale_p May 25 '17 at 20:15

I think a Dirichlet regression would be very appropriate in your case. The samples of a Dirichlet distribution must sum to 1 over the dimensions which is your case. (There are other distributions such as the generalized Dirichlet or the Beta-Liouville that have the same property but that are more sophisticated distributions.)

Check this, it looks like it is for R: http://r-statistics.co/Dirichlet-Regression-With-R.html and that there is a built-in Dirichlet Regression available.

If ever you want to read more about more advanced methods (like power steady models) for predicting compositional data (data that add up to 1) and if you have access to publications you can have a look at these papers and some references they cite:

• Time Series of Continuous Proportions Gary K. Grunwald, Adrian E. Raftery and Peter Guttorp Journal of the Royal Statistical Society. Series B (Methodological) Vol. 55, No. 1 (1993), pp. 103-116

• Modeling and Forecasting Time Series of Compositional Data: A Generalized Dirichlet Power Steady Model International Conference on Scalable Uncertainty Management 2015, pp 170-185 M. Mehdi et al.

• Just had a look into it - it looks like what I am looking into. Will study it and write back when I have some feedback. Many thanks! – vale_p May 25 '17 at 20:21

The simplest solution is to scale the original forecasts $y_i$: $$\tilde y_i=\frac{y_i}{\sum_iy_i}$$

• Indeed, rescaling is a solution I thought about at first. I was thinking of this as a last resort really – vale_p May 25 '17 at 20:18