0
$\begingroup$

Prediction interval in my forecasting is too high. It goes beyond the threshold of 100% of forecasting share of health spending as a percentage of total. This is the relevant data and the associated result:

Forecast method: ETS(M,A,N)

Model Information:
ETS(M,A,N) 

Call:
 ets(y = China_ShareofCHE_TS, model = "ZAZ") 

  Smoothing parameters:
    alpha = 0.9999 
    beta  = 0.9999 

  Initial states:
    l = 21.0746 
    b = 1.207 

  sigma:  0.0319

     AIC     AICc      BIC 
77.44268 81.72840 82.42135 

Error measures:
                      ME     RMSE       MAE        MPE     MAPE      MASE        ACF1
Training set -0.08535053 1.293612 0.9291031 0.04662659 2.145365 0.4175448 -0.01062372

Forecasts:
     Point Forecast       Lo 80     Hi 80      Lo 95     Hi 95
2020       55.60925  53.3394087  57.87909  52.137826  59.08068
2021       55.10945  50.0414170  60.17749  47.358560  62.86035
2022       54.60966  46.1412153  63.07810  41.658293  67.56102
2023       54.10986  41.7282923  66.49143  35.173887  73.04583
2024       53.61006  36.8605786  70.35954  27.993938  79.22619
2025       53.11026  31.5772509  74.64328  20.178362  86.04217
2026       52.61047  25.9051960  79.31574  11.768280  93.45265
2027       52.11067  19.8624391  84.35890   2.791257 101.43008
2028       51.61087  13.4601090  89.76163  -6.735685 109.95743
2029       51.11107   6.7036351  95.51851 -16.804243 119.02639
2030       50.61128  -0.4064919 101.62905 -27.413667 128.63622
2031       50.11148  -7.8742236 108.09718 -38.570001 138.79296
2032       49.61168 -15.7076226 114.93099 -50.285574 149.50894
2033       49.11188 -23.9186433 122.14241 -62.578670 160.80244
2034       48.61209 -32.5229882 129.74716 -75.473303 172.69748
2035       48.11229 -41.5400177 137.76460 -88.999083 185.22366

 
Ljung-Box test

data:  Residuals from ETS(M,A,N)
Q* = 8.2047, df = 3, p-value = 0.04197

Model df: 4.   Total lags used: 7
$\endgroup$
2
  • $\begingroup$ Please don't just copy-paste and dump your data. Format it properly for the community to respond meaningfully. $\endgroup$ Jan 19 at 7:38
  • $\begingroup$ To learn how to provide a minimal reproducible example (this includes sample data in a suitable format), please see stackoverflow.com/help/mcve. And how to do it in R specifically: How to make a great R reproducible example. $\endgroup$
    – dipetkov
    Jan 19 at 8:02

1 Answer 1

1
$\begingroup$

Proportions are a special case of compositional data. You need to take extra steps to ensure that predictions do not go below zero, or above 100%. One common way to do this would be to transform your original series $z_t\in[0,1]$ to

$$y_t:=\ln\bigg(\frac{z_t}{1-z_t}\bigg),$$

then forecast $y_t$ using ETS or any other approach, then back-transform the point forecast $\hat{y}_t$ to

$$ \hat{y}_t := \frac{\exp(\hat{y}_t)}{1+\exp(\hat{y}_t)}. $$

See Snyder et al. (2017). What they call $z_i$ is your $z$, and their "base series" $z_0$ is your $1-z$.

To get prediction intervals, they simulate many times from the forecasts in the transformed space, then back-transform each simulated future, and finally collect quantiles from the back-transformed simulations.

$\endgroup$
1
  • $\begingroup$ Thank you for the answer, sir. However, could you please help me with the R code for the same or any sources from where I can find the R code? Also, how do we restrict the prediction interval of non-compositional data say -source of health spending per capita- from being negative? $\endgroup$ Jan 19 at 9:44

Not the answer you're looking for? Browse other questions tagged or ask your own question.