3
$\begingroup$

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!?

$\endgroup$
  • $\begingroup$ Use the lambda=0 argument when fitting the ARIMA model. $\endgroup$ – Rob Hyndman Jan 3 '15 at 13:08
  • $\begingroup$ 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 stats.stackexchange.com/questions/121592/… $\endgroup$ – Tom Reilly Jan 6 '15 at 20:56
2
$\begingroup$

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.

$\endgroup$
  • $\begingroup$ @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. $\endgroup$ – mugen Jan 3 '15 at 12:37
  • $\begingroup$ @mugen $\exp(\mu)$ and $\exp(\mu+\frac{1}{2}\sigma^2)$ are the median and mean of a 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.] $\endgroup$ – Glen_b Jan 3 '15 at 14:32
  • $\begingroup$ oh, this was too evident, I shoulda realised that myself. Thanks! $\endgroup$ – mugen Jan 3 '15 at 16:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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