4
$\begingroup$

I'm working on a project which aims at analyzing the dataset U.S. Imports of Goods by Customs Basis from China (IMPCH). The main point is to make some prediction but we also want to do a little inference from the data.

As far as I know, the first step is to decompose the time series. There are at least five decomposition methods and the residual (remainder) of all of them passes the unit root tests, indicating the results are stationary, which is desired. However, now I have to pick one of them to proceed, but all seem good.

Which one should I choose, decompose, HoltWinters, forecast::ets, stl, or seasonal::seas?

# dataset
# https://fred.stlouisfed.org/series/IMPCH

IMPCH <- read.csv("IMPCH.csv")
imp <- IMPCH$IMPCH
imp.ts <- ts(imp, frequency = 12, start = 1985)
log.imp.ts <- log(imp.ts)
ts.plot(log.imp.ts)

enter image description here

## Decomposition
library(tseries)

# Stock decompose
log.imp.ts.dcps <- decompose(log.imp.ts)
plot(log.imp.ts.dcps)
log.imp.ts.dcps.remainder <- na.remove(log.imp.ts.dcps$random)
adf.test(log.imp.ts.dcps.remainder)
pp.test(log.imp.ts.dcps.remainder)
kpss.test(log.imp.ts.dcps.remainder)

enter image description here

# Holt-Winters Filtering
log.imp.ts.hw <- HoltWinters(log.imp.ts)
plot(log.imp.ts.hw)
log.imp.ts.hw.remainder <- resid(log.imp.ts.hw)
adf.test(log.imp.ts.hw.remainder)
pp.test(log.imp.ts.hw.remainder)
kpss.test(log.imp.ts.hw.remainder)

enter image description here

# ETS
library(forecast)
log.imp.ts.ets <- ets(log.imp.ts)
plot(log.imp.ts.ets)
log.imp.ts.ets.remainder <- resid(log.imp.ts.ets)
adf.test(log.imp.ts.ets.remainder)
pp.test(log.imp.ts.ets.remainder)
kpss.test(log.imp.ts.ets.remainder)

enter image description here

# STL
log.imp.ts.stl <- stl(log.imp.ts, s.window = "periodic", robust = TRUE)
plot(log.imp.ts.stl)
log.imp.ts.stl.remainder <- log.imp.ts.stl$time.series[, "remainder"]
adf.test(log.imp.ts.stl.remainder)
pp.test(log.imp.ts.stl.remainder)
kpss.test(log.imp.ts.stl.remainder)

enter image description here

# X-13ARIMA-SEATS
library(seasonal)
log.imp.ts.seas <- seas(log.imp.ts)
plot(log.imp.ts.seas)
log.imp.ts.seas.remainder <- resid(log.imp.ts.seas)
adf.test(log.imp.ts.seas.remainder)
pp.test(log.imp.ts.seas.remainder)
kpss.test(log.imp.ts.seas.remainder)

enter image description here

$\endgroup$
1
  • 1
    $\begingroup$ have you seen the answer and/or managed to make any progress with the problem in question? $\endgroup$
    – Dave
    Jun 18, 2019 at 10:16

1 Answer 1

3
+50
$\begingroup$

Holt-Winters is not telling us a lot about the data in terms of additive decomposition, it's only really doing some smoothing. I definitely wouldn't go with that.

Next, ETS. It's better than HW, but it's not segregating the random component of the data. Looking at your results, it seems to be distributing the random variability between the slope and the season components as opposed to isolating it. Also, I don't feel the slope is really telling us much here, it's a bit redundant when you have the level. So, I wouldn't use ETS.

The tseries results look clean and the components are what I would expect. Much better than the previous 2.

STL: personally, I would go with STL. The results you got are more or less as clean as the decompose ones, but I prefer STL because it uses local regression, is robust to outliers, and lets you control the smoothness of the trend cycle.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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