3
$\begingroup$

I would like to build a model to identify the impact (x) of:

  1. Price [double]
  2. Discount [y/n] (if Price differs from the baseline price)
  3. Number of Updates [integer]
  4. Type of Update [3 to 4 categories]

on (y):

  1. Number of Users [Integer]

the data are collected over several years on weekly basis as a time series.

I would like to know which models I should use to analyze the effects of x on y.

I am unsure about the applicability of simple regression models due to the time component.

Is it reasonable to use a regression? Are there other models to take into account (for example is it possible to use a ARMA model although forecasting data is not necessary)?

Users and Pulses

I can also provide a acf and pacf chart of the "#users":

enter image description here

enter image description here

Sample of one series:

date    max_players price   discount    feature_update  non_feature_update  bugfix
2016-08-25  39039   29,99   0   0   0   0
2016-08-26  37923   29,99   0   0   0   0
2016-08-27  37459   29,99   0   0   0   0
2016-08-28  42562   29,99   0   0   0   0
2016-09-01  32942   17,99   1   1   0   0
2016-09-02  32942   17,99   1   0   0   0
2016-09-03  42276   17,99   1   1   0   0
2016-09-04  54829   17,99   1   0   1   0
2016-09-05  63062   17,99   1   0   0   1
2016-09-06  64572   17,99   1   0   0   1
2016-09-07  52973   17,99   1   0   1   0
2016-09-08  51971   29,99   0   0   0   1
2016-09-09  51563   29,99   0   0   0   0
2016-09-10  53717   29,99   0   0   0   0
2016-09-11  63318   29,99   0   0   0   0
2016-09-12  67157   29,99   0   0   0   0
2016-09-13  52523   29,99   0   1   0   0
2016-09-14  48911   29,99   0   0   0   0
2016-09-15  49710   29,99   0   0   1   0
2016-09-16  46975   29,99   0   0   0   0
2016-09-17  51774   29,99   0   0   0   0
2016-09-18  60680   29,99   0   0   0   0
2016-09-19  65198   29,99   0   0   1   0
2016-09-20  50066   29,99   0   1   0   0
2016-09-21  47306   29,99   0   0   0   1
2016-09-22  46590   29,99   0   0   0   0
2016-09-23  45226   29,99   0   0   0   1
2016-09-24  46146   29,99   0   0   0   1
2016-09-25  56896   29,99   0   0   0   0
2016-09-26  61560   29,99   0   0   0   0
2016-09-27  46219   29,99   0   0   0   0
2016-09-28  44442   29,99   0   0   1   0
2016-09-29  43450   29,99   0   0   0   0
2016-09-30  41712   29,99   0   0   1   0
2016-10-01  45370   29,99   0   0   0   1
2016-10-02  55131   29,99   0   0   0   0
2016-10-03  59524   29,99   0   0   0   0
2016-10-04  47338   29,99   0   0   0   0
2016-10-05  43181   29,99   0   0   1   0
2016-10-06  41792   29,99   0   0   0   0
2016-10-07  41495   29,99   0   0   1   0
2016-10-09  52101   29,99   0   0   0   0
2016-10-10  55933   29,99   0   0   0   0
2016-10-11  45347   29,99   0   0   1   0
2016-10-12  40529   29,99   0   0   0   0
2016-10-13  40415   29,99   0   0   0   0
2016-10-14  38686   29,99   0   0   0   0
2016-10-15  40294   29,99   0   0   0   0
2016-10-16  50606   29,99   0   0   0   0
2016-10-17  53051   29,99   0   0   0   0
2016-10-18  40160   29,99   0   0   1   0
2016-10-19  36591   29,99   0   0   1   0
2016-10-20  37959   29,99   0   0   0   0
2016-10-21  38061   29,99   0   1   0   0
2016-10-22  39727   29,99   0   1   0   0
2016-10-23  50458   29,99   0   0   0   1
2016-10-24  54243   29,99   0   0   0   0
2016-10-25  41757   29,99   0   0   0   0
2016-10-26  39178   29,99   0   0   0   0
2016-10-27  38168   29,99   0   0   0   0
2016-10-28  37527   14,99   1   1   0   0
2016-10-29  38837   14,99   1   0   1   0
2016-10-30  50386   14,99   1   0   0   0
2016-10-31  52929   14,99   1   0   0   0
2016-11-04  38601   29,99   0   0   0   0
2016-11-05  42920   29,99   0   0   0   0
2016-11-06  51289   29,99   0   0   0   0
2016-11-07  52256   29,99   0   0   0   0
2016-11-08  38566   29,99   0   1   0   0
2016-11-09  35229   29,99   0   0   0   0
2016-11-10  34591   29,99   0   0   0   1
2016-11-11  34886   29,99   0   0   0   0
2016-11-12  41356   29,99   0   0   0   0
2016-11-13  48245   29,99   0   0   0   0
2016-11-14  50841   29,99   0   0   0   0
2016-11-15  38605   29,99   0   0   1   0
2016-11-16  36777   29,99   0   0   0   0
2016-11-17  36002   29,99   0   0   0   1
2016-11-18  35243   29,99   0   1   0   0
2016-11-19  37881   29,99   0   0   1   0
2016-11-20  47458   29,99   0   0   1   0
2016-11-21  48759   29,99   0   0   0   1
2016-11-22  39297   29,99   0   1   0   0
2016-11-23  38085   14,99   1   0   0   0
2016-11-24  38590   14,99   1   1   0   0
2016-11-25  38024   14,99   1   0   1   0
2016-11-26  46667   14,99   1   0   0   0
2016-11-27  52361   14,99   1   0   0   0
2016-11-28  54698   14,99   1   0   0   1
2016-11-29  43704   29,99   0   0   0   0
2016-11-30  42763   29,99   0   0   1   0
2016-12-01  40427   29,99   0   0   1   0
2016-12-02  39850   29,99   0   0   1   0
2016-12-03  41169   29,99   0   0   0   1
2016-12-04  50849   29,99   0   0   0   0
2016-12-05  52908   29,99   0   0   1   0
2016-12-06  41864   29,99   0   0   1   0
2016-12-07  40596   29,99   0   0   1   0
2016-12-08  40498   29,99   0   0   0   0
2016-12-09  40865   29,99   0   0   1   0
2016-12-10  43519   29,99   0   0   0   0
2016-12-11  51400   29,99   0   0   1   0
2016-12-12  53050   29,99   0   0   0   0
2016-12-13  42110   29,99   0   0   0   0
2016-12-14  40826   29,99   0   0   0   0
2016-12-15  39789   29,99   0   0   0   0
2016-12-16  38680   29,99   0   0   0   0
2016-12-17  42481   29,99   0   0   0   1
2016-12-18  49664   29,99   0   0   0   0
2016-12-19  51612   29,99   0   0   1   0
2016-12-20  44362   29,99   0   0   0   0
2016-12-21  42786   29,99   0   0   0   0
2016-12-22  43471   11,99   1   0   0   0
2016-12-23  43948   11,99   1   1   0   0
2016-12-24  43948   11,99   1   0   1   0
2016-12-25  43948   11,99   1   0   0   0
2016-12-26  43948   11,99   1   0   0   0
2016-12-27  43948   11,99   1   0   1   0
2016-12-28  47371   11,99   1   0   1   0
2016-12-29  64986   11,99   1   0   1   0
2016-12-30  66044   11,99   1   0   1   0
2016-12-31  67651   11,99   1   0   0   1
2017-01-01  59502   11,99   1   0   0   0
2017-01-02  74021   29,99   0   1   0   0
2017-01-03  76879   29,99   0   0   1   0
2017-01-04  66039   29,99   0   0   0   0
2017-01-05  64134   29,99   0   1   0   0
2017-01-06  62671   29,99   0   1   0   0
2017-01-07  65422   29,99   0   0   0   0
2017-01-08  71074   29,99   0   0   0   0
2017-01-09  74114   29,99   0   1   0   0
2017-01-10  56863   29,99   0   0   0   0
2017-01-11  56995   29,99   0   0   1   0
2017-01-12  55896   29,99   0   0   0   0
2017-01-13  55695   29,99   0   0   0   0
2017-01-14  61148   29,99   0   0   0   0
2017-01-15  72129   29,99   0   0   0   0
2017-01-16  73922   29,99   0   0   0   0
2017-01-17  66019   29,99   0   0   1   0
2017-01-18  58528   29,99   0   0   0   0
2017-01-21  59914   29,99   0   0   0   1
2017-01-22  71172   29,99   0   0   0   0
2017-01-23  73627   29,99   0   0   0   0
2017-01-24  58113   29,99   0   0   0   0
2017-01-25  56941   29,99   0   0   0   0
2017-01-26  55046   29,99   0   0   0   0
2017-01-27  53758   29,99   0   0   0   0
2017-01-28  56559   29,99   0   0   0   0
2017-01-29  67314   29,99   0   0   0   0
2017-01-30  71134   9,89    1   0   0   0
2017-01-31  57158   9,89    1   1   0   0
2017-02-02  67324   9,89    1   0   1   0
2017-02-03  70359   9,89    1   0   1   0
2017-02-04  74083   9,89    1   0   0   1
2017-02-05  91907   9,89    1   0   0   0
2017-02-06  100723  29,99   0   0   0   0
2017-02-07  82295   29,99   0   0   1   0
2017-02-08  77693   29,99   0   0   0   0
2017-02-10  71480   29,99   0   0   0   0
2017-02-11  74149   29,99   0   0   0   0
2017-02-12  85277   29,99   0   1   0   0
2017-02-13  90983   29,99   0   0   0   0
2017-02-14  72058   29,99   0   0   1   0
2017-02-15  64178   29,99   0   0   0   1
2017-02-16  65910   29,99   0   0   0   0
2017-02-17  65179   29,99   0   0   0   0
2017-02-18  69088   29,99   0   0   0   0
2017-02-19  78561   29,99   0   0   0   0
2017-02-20  82133   29,99   0   0   0   0
2017-02-21  70649   29,99   0   0   0   0
2017-02-22  63745   29,99   0   0   0   0
2017-02-23  61227   29,99   0   0   0   1
2017-02-24  60088   29,99   0   0   0   0
2017-02-25  61625   29,99   0   0   0   0
2017-02-26  71665   29,99   0   1   0   0
2017-02-27  74331   29,99   0   0   0   0
2017-02-28  63413   29,99   0   1   0   0
2017-03-01  60238   29,99   0   0   0   0
2017-03-02  58901   29,99   0   0   0   0
2017-03-03  58938   29,99   0   0   0   0
2017-03-04  61809   29,99   0   0   0   0
2017-03-05  71773   29,99   0   0   0   0
2017-03-06  75022   29,99   0   0   0   0
2017-03-07  57393   29,99   0   0   1   0
2017-03-08  55578   29,99   0   0   0   1
2017-03-09  53680   29,99   0   0   0   0
2017-03-10  52638   29,99   0   0   0   1
2017-03-11  56151   29,99   0   0   0   0
2017-03-12  66547   29,99   0   0   0   0
2017-03-13  71443   29,99   0   0   0   0
2017-03-14  56042   29,99   0   0   0   0
2017-03-15  55919   29,99   0   0   0   0
2017-03-16  53654   29,99   0   0   0   0
2017-03-17  51233   29,99   0   0   0   0
2017-03-18  55545   29,99   0   0   0   0
2017-03-19  64265   29,99   0   0   0   0
2017-03-20  69139   29,99   0   0   0   0
2017-03-22  51732   29,99   0   0   0   1
2017-03-23  50819   29,99   0   0   0   0
2017-03-24  49588   29,99   0   0   0   0
2017-03-25  53729   29,99   0   0   1   0
2017-03-26  61191   29,99   0   0   0   0
2017-03-27  64379   29,99   0   0   0   0
2017-03-28  51152   29,99   0   0   0   0
2017-03-29  49390   29,99   0   0   0   0
2017-03-30  48235   29,99   0   0   0   0
2017-03-31  47037   9,89    1   0   0   0
2017-04-01  49700   9,89    1   1   0   0
2017-04-02  65440   9,89    1   0   1   0
2017-04-03  73857   29,99   0   0   0   0
2017-04-04  60688   29,99   0   0   0   1
2017-04-05  57498   29,99   0   0   1   0
2017-04-06  54577   29,99   0   1   0   0
2017-04-07  54791   29,99   0   0   1   0
2017-04-08  57562   29,99   0   0   1   0
2017-04-09  66769   29,99   0   0   1   0
2017-04-10  69825   29,99   0   0   0   0
2017-04-11  57655   29,99   0   0   0   0
2017-04-12  55361   29,99   0   0   0   0
2017-04-13  52963   29,99   0   0   1   0
2017-04-14  53979   29,99   0   0   1   0
2017-04-15  59100   29,99   0   1   0   0
2017-04-16  62508   29,99   0   0   0   0
2017-04-17  63080   29,99   0   0   0   0
2017-04-18  60446   29,99   0   0   1   0
2017-04-19  54050   29,99   0   0   0   0
2017-04-20  52534   29,99   0   0   0   0
2017-04-21  50616   29,99   0   0   0   1
2017-04-22  53934   29,99   0   0   1   0
2017-04-23  62763   29,99   0   0   1   0
2017-04-24  63912   29,99   0   0   0   0
2017-04-25  50050   29,99   0   0   0   1
2017-04-26  47725   29,99   0   0   0   0
2017-04-27  46977   29,99   0   0   0   0
2017-04-28  45545   29,99   0   0   0   0
2017-04-29  48402   29,99   0   0   0   0
2017-04-30  56985   29,99   0   0   0   0
2017-05-01  61949   29,99   0   0   0   0
2017-05-02  55525   29,99   0   0   0   0
2017-05-03  48430   29,99   0   0   0   0
2017-05-04  47434   29,99   0   0   0   0
2017-05-05  46950   29,99   0   0   0   0
2017-05-06  49236   29,99   0   1   0   0
2017-05-07  59872   29,99   0   0   1   0
2017-05-08  66342   29,99   0   0   0   0
2017-05-09  54094   29,99   0   0   0   0
2017-05-10  51332   29,99   0   0   0   1
2017-05-11  49753   29,99   0   0   0   0
2017-05-12  47723   29,99   0   0   0   0
2017-05-13  51673   29,99   0   0   0   1
2017-05-14  61013   29,99   0   0   0   0
2017-05-15  60785   29,99   0   0   0   0
2017-05-16  49562   29,99   0   0   1   0
2017-05-17  46863   29,99   0   0   0   0
2017-05-18  45554   29,99   0   0   0   0
2017-05-19  45212   29,99   0   1   0   0
2017-05-20  49810   29,99   0   0   0   1
2017-05-21  57250   29,99   0   0   0   0
2017-05-22  59843   29,99   0   0   1   0
2017-05-23  47277   29,99   0   0   0   0
2017-05-24  44891   29,99   0   0   0   0
2017-05-25  45295   29,99   0   0   0   0
2017-05-26  45839   29,99   0   0   0   0
2017-05-27  46266   29,99   0   0   0   0
2017-05-28  51363   29,99   0   0   0   0
2017-05-29  55601   9,59    1   0   0   0
2017-05-30  53186   9,59    1   1   0   0
2017-05-31  46666   9,59    1   0   0   0
2017-06-01  52028   9,59    1   0   1   0
2017-06-02  52632   9,59    1   0   1   0
2017-06-03  57221   9,59    1   0   1   0
2017-06-04  67153   9,59    1   0   0   1
2017-06-05  76482   29,99   0   0   0   0
2017-06-06  71054   29,99   0   1   0   0
2017-06-07  61003   29,99   0   0   0   0
2017-06-08  60949   29,99   0   1   0   0
2017-06-10  59094   29,99   0   0   0   1
2017-06-11  62551   29,99   0   0   0   0
2017-06-12  67178   29,99   0   1   0   0
2017-06-13  56826   29,99   0   0   0   1
2017-06-14  61548   29,99   0   0   0   0
2017-06-15  63704   29,99   0   0   0   0
2017-06-16  66260   29,99   0   0   0   1
2017-06-17  67195   29,99   0   0   0   0
2017-06-18  72432   29,99   0   0   0   0
2017-06-19  75091   29,99   0   0   0   0
2017-06-20  65587   29,99   0   0   0   0
2017-06-23  54352   14,69   1   0   0   1
2017-06-24  61124   14,69   1   1   0   0
2017-06-25  68032   14,69   1   0   0   0
2017-06-26  75829   14,69   1   0   0   0
2017-06-27  66573   14,69   1   0   0   0
2017-06-28  64034   14,69   1   0   0   0
2017-06-29  62206   14,69   1   0   0   0
2017-06-30  61157   14,69   1   1   0   0
$\endgroup$
3
$\begingroup$

You are quite correct that model identification can be a serious issue when you have time series data. What you want to do is to construct a hybrid regression model and an ARIMA component while taking into account the following: 1) potential lead and lag effects of user specified input/causal series e.g. customer is aware of a discount on a following day 2) fixed effects like day-of-the-week, week-of-the-month , week-of-the-year , month-of-the-year, day-of-the-month , long-weekend effects et al 3) latent factors like level shifts and/or local time trends 4) unusual values needing to be identified and normalized to both reveal unknown factors and to provide robust model parameter estimates 5) time varying parameters and/or time varying error variance.

The general concept is called a Transfer Function and sometimes referred to as a Dynamic Regression. You can pursue this thread here https://onlinecourses.science.psu.edu/stat510/node/75 and here Transfer Function Confidence interval estimation and here http://autobox.com/cms/index.php/afs-university/intro-to-forecasting/doc_download/23-forcasting-family-tree

I believe all of this is in the spirit of @F.Tusel's comments aside from his state space preference which is decidedly not my choice as forecasts have to be made and easily interpreted/understood in the observed space.

EDITED AFTER RECEIPT OF DATA :

The data was submitted to AUTOBOX which found that none of the user specified predictors were ultimately found to be significant. Here is the final model enter image description here suggesting strong period to period and week-to-week dependency along with a level shift , 2 pulses and 4 seasonal (daily ) factors. Following is the Actual/Fit/Forecast graph enter image [![description here][2]][2] and the 21 period out forecast . [![enter image description here][3]][3] . The Residual plot is shown here [![enter image description here][4]][4] with acf here suggesting sufficiency.

The model statistics are here enter image description here and here enter image description here

$\endgroup$
  • $\begingroup$ I do not see the problem obtaining forecasts in the observed space, once you have filteres/smnoothed estimates of the state vector. The reason I lean towards state-space models is that they achieve a nice separation between phenomena (modeled in the state equation) and observation. So, for instance, the state can evolve following a gaussian random walk and observations can be integer-valued, binomially distributed. I wouldn't know how to achieve that with an ARMA model. $\endgroup$ – F. Tusell Jul 14 '17 at 7:22
  • $\begingroup$ @F. Tussel Just out of curiosity, is a state-space model more interpretable than an ARMAX model? Have you ever encountered a scenario where SS would succeed and ARMA would fail? $\endgroup$ – Digio Jul 14 '17 at 7:54
  • $\begingroup$ Don't really know what you mean by "succeed" and "fail". But there are situations in which thinking in terms of a SS model, looking at the state vector as latent variables not directly observable, has helped me a lot. On the other hand, I have often been unable to attach meaning to coefficients in ARMA(X) models, particularly coefficients attached to the MA terms. $\endgroup$ – F. Tusell Jul 14 '17 at 9:05
  • $\begingroup$ MA terms can be restated as AR terms thus enabling interpretation of the PDL (ADL) $\endgroup$ – IrishStat Jul 14 '17 at 9:46
  • $\begingroup$ @IrishStat thanks a lot for your feedback! Although I am not really familiar with these kind of models I will try to perform a dynamic regression with my data. Could you name me a source where a practical example of a dynamic regression is applied or a step-by-step "instruction" is given? $\endgroup$ – Dbb Jul 14 '17 at 10:50
2
$\begingroup$

You could use an ARMAX model (where the final X stands for the eXogenous variables). The use of a time series model instead of an ordinary regression is required if (as seems likely) your data has some temporal structure: serial correlation, for instance.

An state-space model is, in my view, easier to comprehend and handle and really amounts to the same thing.

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