*3.3. Forecasting Inputs and Output for 2018 to 2023*

In this stage, the grey model GM (1,1) was employed to forecast the input and output data for the future period of 2018–2023 based on the data of the past period of 1990–2017. Then, the forecasted data were used to obtain the efficiency scores for the future period. However, before using the DEA to measure energy efficiency over the period 2018–2023, an accuracy test must be conducted to ensure that the forecasted data are reliable. Accuracy is controversial and of concern whenever a forecasting is produced since an error always exists. Therefore, this study measured the accuracy by using the mean absolute percent error (MAPE), which is applied commonly in many prediction studies.

MAPE is the mean average absolute percent error that measures the accuracy in a fitted time series value in statistics, specifically trending [33].

$$MAPE = \left(\frac{1}{n} \sum\_{k=1}^{n} \left| \frac{\mathbf{x}^{(0)}(k) - \hat{\mathbf{x}}^{(0)}(k)}{\mathbf{x}^{(0)}(k)} \right| \right) \times 100\% \tag{10}$$

where *n* is the forecasting number of steps.

The parameters of the MAPE state the forecasting ability as follows:



**Table 2.** Average mean absolute percent error (MAPE) of all DMUs.

The MAPE results are displayed in Table 2, which shows that the MAPE results of all inputs and outputs ranged from the lowest of 0.1% to the highest at 8.2% and the average MAPE of all inputs and outputs was 2.4%. As the MAPE values obtained were all smaller than 10%, it confirmed that the GM (1,1) has good prediction accuracy in this research and that the forecasted data can be used in the further step of obtaining efficiency scores.

*Energies* **2019**, *12*, 3804

The input "Total energy consumption" of Indonesia is used as an example to illustrate the generation of the forecast data. The sequence of raw data during 2008–2017 is as follows:

$$\begin{aligned} \mathbf{x}^{(0)} &= \begin{pmatrix} \mathbf{x}^{(0)}(1), \dots, \mathbf{x}^{(0)}(10) \end{pmatrix} \\ \mathbf{x} &= \begin{pmatrix} 58.3, 55.9, 60.1, 56.2, 53.8, 55.9, 52.9, 53.2, 56.7, 55.6 \end{pmatrix} \end{aligned} \tag{11}$$

Simulate this sequence by respectively using the following three GM (1,1) models and comparing the simulation accuracy:

From *x*(0)(*k*) + *ax*(1)(*k*) = *b*; compute the accumulation generation of *x*(0) as follows:

$$\mathbf{x}^{(1)} = \begin{pmatrix} \mathbf{x}^{(1)}(1), \dots, \mathbf{x}^{(1)}(n) \end{pmatrix} \tag{12}$$
  $\mathbf{x} = (58.3, 114.2, 174.3, 230.5, 284.3, 340.2, 391.1, 446.3, 503.0, 558.6)$ 

In the next stage, the different equations of GM (1,1) are created with the mean equation:

$$z^{(1)}(2) = 0.5(58.3 + 114.2) = 86.22\tag{13}$$

$$z^{(1)}(10) = 0.5(503 + 558.6) = 530.8 \tag{14}$$

To continue, the values for coefficients *a* and *b* are found

$$B = \begin{bmatrix} -116.3 & 1 & & & & 55.9 & & \\ & -127.3 & 1 & & & & 60.1 & \\ & -228.4 & 1 & & & & 60.1 & \\ & -284.5 & 1 & & & & 56.2 & \\ & -340.5 & 1 & & & 53.8 & & \\ & -396.6 & 1 & & & & 55.9 & \\ & -508.7 & 1 & & & & 52.9 & \\ & -508.7 & 1 & & & & 53.2 & \\ & -564.8 & & 1 & & & & 56.7 & \\ \end{bmatrix} \tag{15}$$

By using the least square estimation, we can obtain the sequence of parameters [*a*, *b*] *<sup>T</sup>* as follows:

$$\hat{\mathbf{a}} = \begin{bmatrix} \mathbf{a} \\ \mathbf{b} \end{bmatrix} = \left(\mathbf{B}^T \mathbf{B}\right)^{-1} \mathbf{B}^T \mathbf{Y}\_N = \begin{bmatrix} 0.00548567 \\ 57.4599547 \end{bmatrix} \tag{16}$$

Compute the simulated value of *x*(0), the original series according to the accumulated generating operation by using

$$\begin{aligned} \mathfrak{X}^{(0)}(k+1) &= \mathfrak{X}^{(1)}(k+1) - \mathfrak{X}^{(1)}(k) \\ &= 54.24 \left( for casted \text{ } for \text{2018} \right) \end{aligned} \tag{17}$$

.

The same was used to forecast the inputs and outputs of other countries over the period 2018–2023.
