4

I have fitted a seasonal ARIMA model using R to a log transformed times series which I called lnseries.

I can forecast fine for the transformed time series (lnseries) storing the ARIMA model (which I called fit) then using the command:

$\texttt{plot(forecast(fit))},$

this shows me the forecast and 95% confidence interval. But I'm stuck on how to get the actual original time series forecast plot using this model.

Help anyone!?

Glen_b
  • 257,508
  • 32
  • 553
  • 939
  • Use the lambda=0 argument when fitting the ARIMA model. – Rob Hyndman Jan 03 '15 at 13:08
  • 2
    Careful with the use of logs. Like drugs, they can have side effects. They are an overused tool that can be handled in other ways in a less risky fashion. Take a look at this post http://stats.stackexchange.com/questions/121592/determine-when-time-series-should-be-logged-or-any-other-transformation-and-ap – Tom Reilly Jan 06 '15 at 20:56

1 Answers1

2

If you're trying to forecast an interval for future observations, exponentiating the limits from the log-scale forecasts should do.

If your log-data is approximately symmetric, exponentiating the log-scale forecast should give you a median forecast on the original scale; if that's good enough you're pretty much set.

If your sample sizes are quite large and you have approximate normality on the log scale you could treat your variance estimate as "known" and produce a reasonable approximation of a mean forecast by taking $\exp(\hat{y}_t+\frac{1}{2}\sigma^2_{t})$ where $\sigma^2_{t}$ is the conditional variance of the predicted observation.

Glen_b
  • 257,508
  • 32
  • 553
  • 939
  • @Gleb_b is adding $.5\sigma^2$ how you transform the median to the mean under normality assumption? Also, OP is modelling ARIMA, you may need to drop the subscript $t$ in the variance. – mugen Jan 03 '15 at 12:37
  • @mugen $\exp(\mu)$ and $\exp(\mu+\frac{1}{2}\sigma^2)$ are the median and mean of a [lognormal distribution](http://en.wikipedia.org/wiki/Lognormal_distribution). [However, if we account fully for the estimation error in $\sigma$ as well, then you'd get a distribution which doesn't have a mean; but the prediction limits for an individual observation still apply just fine.] – Glen_b Jan 03 '15 at 14:32
  • oh, this was too evident, I shoulda realised that myself. Thanks! – mugen Jan 03 '15 at 16:24
  • Hi @Glen_b. I want to ask you why the first if is alright? I just want to know for the sake of understanding. I'll really appreciate it. What i am scared of is that my confidence intervals will blow away (more than they should) with the exponentiation. – Mangostino Nov 24 '21 at 22:16
  • For individual observations the events correspond under monotonic increasing transformation (including logs and exponentiation), so $P(l\leq Y_t\leq u)=P(\log(l)\leq \log(Y_t)\leq \log(u))$. But for a parameter, the log or exp of a mean is not itself the mean on the transformed scale. – Glen_b Nov 24 '21 at 23:14