2
$\begingroup$

I've got a time-series data (let's denote it as y) and some feature (let's denote it as x). y is dependent on x, but x is often equal to 0. Even then, y is not 0, so we can assume that there's a base level in y which is independent of x. Additionally, we can observe some seasonality in y. I need to decompose y into base level and an effect of x. And I need some hint about methodology. I have googled and found plenty of methods to decompose time-series data into trend, seasonality and random noise. However, my case is different, because I have an additional feature x and I would like just to extract its effect, and leave trend, seasonality and noise alltogether. What I have in mind can be represented on a plot below, where turquoise area represents base level of y and red area represents an effect of x. What method would allow to make such a split? I would also appreciate any links or materials.

enter image description here

$\endgroup$
  • $\begingroup$ The Residual RNN could be relevant, but you need to modify a bit. The idea is to use a linear model (i.e. ARIMA or KF) to predict y based on history of y, and use a RNN to model the residual errors (predicted_y - y). $\endgroup$ – user12075 Sep 8 '18 at 18:11
  • $\begingroup$ Another thing to think about. If x has trend/seasonality, and x influences y to have a similar trend/seasonality, would you define that part of variance in y as "effects of x", or "y's seasonality"? You may want to do an ANOVA test between x and the residual errors (predicted_y - y) to see whether x affects y besides y's own trend/seasonality. $\endgroup$ – user12075 Sep 8 '18 at 18:16
3
$\begingroup$

You are describing multivariate time series analysis, modeling the interactions and comovements among a group of time series variables.

You can start with a vector autoregression (VAR) model, one of the most successful, flexible, and easy to use models for the analysis of multivariate time series. Then work through the decomposition of time series.

You'll have to decide if you want assume if all components time series are stationary and ergodic. Each component will have autocovariances and autocorrelations but there are also cross lead-lag covariances and correlations between all possible pairs of components.

|improve this answer|||||
$\endgroup$
0
$\begingroup$

I would use some form of seasonal time series model that accepts external regressors, like auto.arima from forecast in R. There's a nice example from Rob Hyndman here. Likely any method you use will decompose the series into seasonal, trend, level and residual in addition to the contribution of the external regressor, but it is easy enough to re-combine everything except the external regressor to achieve the plot you're after.

|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.