Am 05.01.2025 um 02:13 schrieb Brian Revell:
Take the antilog of the log{y}=z transformed actual and fitted or forecast values from the ARIMA model, which if in natural logs will  be EXP(z).

Brian, as explained (inter alia) by Dave Giles in the link that Allin gave, this is not completely correct.

However, ... (see further down)


On Sat, 4 Jan 2025, 23:59 Cottrell, Allin, <cottrell@wfu.edu> wrote:
On Sat, Jan 4, 2025 at 2:55 PM <dbrilakis@yahoo.gr> wrote:
>
> Hi, I found that my data become stationary (after differentiate) the log data with best ARIMA(p,d,q)  How do I rebuilt the ARIMA forecast to the origina scale before log?

There's a standard means of converting from a forecast or fitted value
of log(y) to that of y itself, if the error term is reckoned to be
normal, plus some variations on the theme. Dave Giles has quite a nice
discussion of the point: see
https://davegiles.blogspot.com/2014/12/s.html

One interesting point on that blog page is also the comment by user "Daumantas", citing BÅRDSEN, G. & LÜTKEPOHL, H. 2011. Forecasting levels of log variables in vector autoregressions. International Journal of Forecasting, 27, 1108-1115:  '...if specification and estimation uncertainty are taken into account [...] in practice, using the exponential of the log forecast is preferable to using the optimal forecast." [...] (Log-normality is assumed...)'

In that sense Brian's simple recipe would not be misguided.

Apart from that, this natural question has been asked a couple of years ago, see:

https://gretlml.univpm.it/hyperkitty/list/gretl-users@gretlml.univpm.it/thread/2K4YC2SIC35S5ZVLDNITVGNQHFBZWQUV/#2K4YC2SIC35S5ZVLDNITVGNQHFBZWQUV

For convenience, I'm reproducing the script that Jack provided back then:

<hansl> open bjg.gdt --quiet series insample = t < "1960:3" series f = NA smpl insample == 1 --restrict arima 0 1 1 ; 0 1 1 ; lg fcast --out-of-sample matrix F = $fcast + 0.5 * $fcse.^2 smpl insample == 0 --restrict --replace f = exp(F) setinfo f --graph-name="forecast" smpl full gnuplot g f --time-series --with-lines --output=display

</hansl>

Actually, I'm not sure whether in this script $fcse should be used as an estimator of the theoretical sigma, or perhaps rather the model accessor $sigma.

Again, all this assumes (log)normal errors, which might be completely wrong for the given data.

Maybe we could offer something more automated if the dependent variable of a model is recognized as being the log of something. As this is becoming increasingly technical, I will post something to follow up on this to the development list.

cheers

sven