0
$\begingroup$

In order to proceed with a time series forecasting, the data set has to be stationary. Stationarity can be determined using a number of packages, the most famous (as far as I could understand) is statsmodel.

What I was not able to pick to date is when I have to use one method vs the other (additive or multiplicative).

Any simple explanation?

$\endgroup$
1
$\begingroup$

You say you have managed to make your data stationary, so I would probably say an additive model is your best starting point. You could simply plot your stationary data and check that the variance doesn't increase with the nominal values. High variance will mean higher errors for a linear regression.

When we have a basic regression model, like the following:

$$ y = \beta_1x_1 + \beta_2x_2 + \epsilon $$

the residual error $\epsilon$ is hypothesized to be constant (assuming the model itself is accurate). $\epsilon$ should not get larger when there are larger values for the covariates $x_1$ $x_2$. In other words, you expect homoscedasticity: that the error term is the same across all values of the model covariates. This is what you will easily spot on the plot of your processed (stationary) data.

If you made you time series stationary by taking the logarithms (a.k.a differencing), then an additive model of the log-ed variables would almost correspond to a multiplicative model.

Just to be clear, if you still seem to have heteroscedasticity with $\epsilon$ varying greatly, this might imply that your model itself is ill-formed e.g. that an important factor is missing.

| improve this answer | |
$\endgroup$
  • $\begingroup$ Thanks, I'm actually one stage ahead. I'm trying to determine whether the data is stationary. However, I get ADF and KPSS telling me the opposite each other. So I can tell whether they are. I am doing some research to understand how to manage this. Any hints here? $\endgroup$ – Andrea Moro May 20 at 9:04
  • $\begingroup$ Making your data stationary is usually the first step, before making the model. One simple way of doing this is to perform "differencing". This essentially means computing the change between each time-step. Like discrete differentiation. If using a pandas DataFrame, there is a method for it: df["diffed_variable"] = df["variable"].diff(). It is common in finance, e.g. with stock prices, to first compute the logarithm of the data, then take the differences. You can look into the (augmented) Dickey-Fuller (ADF) test, which is one way to check for stationarity, e.g. before and after differencing $\endgroup$ – n1k31t4 May 25 at 7:16
  • $\begingroup$ Well, I've already done that. So I assume I have all in place? In fact, that was the last bit before then achieving the stationarity which I got the more I progressed. $\endgroup$ – Andrea Moro May 25 at 9:29
  • $\begingroup$ If you can show your data is stationary using one of those tests, then you could start modelling. If the stationarity tests are giving conflicting results, it could well be that your steps to make it stationary (e.g. taking differences) has kind of removed a lot of the signal. I would just choose ADF, test before and after your processing steps to see that it goes from non-stationary to stationary, then progress to picking a model. If the model turns out to give terrible performance, perhaps go back and check for stationarity another way or use a different approach. $\endgroup$ – n1k31t4 May 25 at 12:42
  • $\begingroup$ understand. And would you use the RSME to determine the quality of the prediction? I got and cannot achieve better than a 69%. Is that something suitable for a time serie forecast, or would that be valid only for linear regressions? $\endgroup$ – Andrea Moro May 25 at 15:16
0
$\begingroup$

One possible way modeling time-series is as a three components process:
trend, seasonality and noise.

$X_t$ = M($TREND_t$, $SEASON_t$, $NOISE_t$).

Additive model assumes linear relationship, I.E:
$X_t$ = $TREND_t$ + $SEASON_t$ + $NOISE_t$.

Multiplicative model assumes cross relationship:
$X_t$ = $TREND_t$ * $SEASON_t$ * $NOISE_t$.

If data or prior suggests that the trend magnitude(or direction) affects noise or seasonality - or any other cross relation, it makes sense using a multiplicative model.

See this related question.

| improve this answer | |
$\endgroup$

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.