Seeking guidance on approach.

I have some marketing spend data along with historic target variable revenue.

If management would like to estimate online revenue over the next 3 months given a media plan (A document showing which dollars will be spent on which channels), would you use a regression or e.g. decision tree model, or would you go the time series route?

Some data:

eg_data <- data.frame(
  revenue = round(rnorm(100, 10000, 100),0),
  youtube_spend = round(rnorm(100, 100, 10),0),
  facebook_spend = round(rnorm(100, 200, 20),0),
  tv_spend = round(rnorm(100, 5000, 1000),0)

# create a date range and combine to data frame
yesterday <- Sys.Date() - 1
yesterday_99 <- yesterday - 99
date_range <- seq(yesterday_99,yesterday, by = '1 day')
eg_data <- cbind(eg_data, date_range)

  revenue youtube_spend facebook_spend tv_spend date_range
1    9938            97            227     4781 2017-10-24
2    9882            96            172     4363 2017-10-25
3    9990           101            184     6514 2017-10-26
4    9970            93            156     4140 2017-10-27
5    9955            99            215     4377 2017-10-28
6    9951           104            250     6716 2017-10-29

I could build a linear model where revenue is a function of youtube, facebook and tv spend.

However, if I have a date field, should I use it? What is the conventional approach here if management want to predict sales over the next month?

If I do go the time series route can I include the spend variables?

Putting the question another way, is it possible (or even advisable), to combine a regression model with a time series in some way?


1 Answer 1


Regression is a particular case of a multivariate ARIMA (also known more widely as a Transfer Function ; 1 endogenous and 1 or more exogenous ). Model identification of a TF model is discussed here http://www.math.cts.nthu.edu.tw/download.php?filename=569_fe0ff1a2.pdf&dir=publish&title=Ruey+S.+Tsay-Lec1 and here https://web.archive.org/web/20160216193539/https://onlinecourses.science.psu.edu/stat510/node/75/. Automatic identification of a TF model is available and discussed here How to include control variables in an Intervention analysis with ARIMA? AND http://autobox.com/pdfs/ForecastingSeminar.pdf

It is exactly what you asked for ... a combination of regression and time series while taking into account "unusual activity" such as pulses, level shifts, seasonal pulses,time trends ... Since your data set is daily the seasonal pulses would reflect day-of-the-week activity.


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.