In the creation of a "marketing mix model", past sales data, is regressed against various marketing spend (TV, radio, billboards etc) along with other aspects influencing a companies sales such as pricing changes, competitors, seasonality, etc.

The goals are to understand the impacts of marketing on sales and how one might optimize these investments.

What is typically output from the model are both a retrospective and a forecast.

1) Forecast : If next year we assume pricing, competitors and given levels of marketing spend in these channels, what will sales be?

2) Retrospective : A decomposition of the prior years sales into baseline (the intercept) and the other elements of our model.

Often linear regression is used for these models, but it seems Arimax would be more suitable. Can this type of model still be used to decompose historical or future periods (we have the regression component but I am wondering if the arima errors portion keep us from making this inference)?

Here is an example :

dat<-read.table(dat.csv)  #The data
sales_ts <- ts(dat$SalesVol, start=c(1988, 1), end=c(1991, 12), frequency=12) 
arima_mod<-Arima(sales_ts,order = c(1,1,1),xreg = as.matrix(subset(dat,,c(TVAds,RadioAds))))

The summary of the model is:

Regression with ARIMA(1,1,1) errors 

         ar1      ma1   TVAds  RadioAds
      0.4298  -0.3219  7.6774   81.2355
s.e.  0.4032   0.3995  9.2620  108.2095

If I look at the fitted value for the 3rd observation is it 38169.22. The prediction from the linear model is

arima_mod$coef['TVAds'] * dat$TVAds[3] + arima_mod$coef['RadioAds']*dat$RadioAds[3]


So in this case the "baseline" would be 38169- 4069.

Would this work for the other observations and for predictions?


Your ARIMA model is (probably !) an overfit and (probably ) is the cause of your confusion. What you are looking for might be a transfer function model (a.k.a. ARMAX) expressed as a right-hand side model. https://stats.stackexchange.com/search?q=user%3A3382+transfer+function+model+as+a+right-hand+side

in general ...... where the time lag effects are IDENTIFIED rather than assumed and anomalous data is rendered harmless and trends and level shifts are clarified.

enter image description here

  • $\begingroup$ I just changed the code section, clearly I was blind in my initial thought that the prediction from the linear regression was larger than the overall fitted value. Does this now look like a valid approach? $\endgroup$
    – B_Miner
    Mar 4 '19 at 17:52
  • $\begingroup$ I assume by transfer function you how the effect of marketing is decayed over time (e.g. adstock)? I would look at that, this is just a quick example to see if regression with arima errors would be OK. $\endgroup$
    – B_Miner
    Mar 4 '19 at 17:53
  • $\begingroup$ Your comment about "...in general: means that this approach is valid? $\endgroup$
    – B_Miner
    Mar 4 '19 at 19:25
  • 1
    $\begingroup$ Yes ... in this way you are accomodating for the impact of the X's that you know and the DETERMINISTIC X's (I's) that you don't know and the STOCHASTIC X's (e's ) that you don't know. $\endgroup$
    – IrishStat
    Mar 4 '19 at 21:04
  • 1
    $\begingroup$ 4 SURE ! ARIMA structure is an admission of ignorance as the past never causes the future $\endgroup$
    – IrishStat
    Mar 5 '19 at 20:12

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.