Skip to main content
edited tags
Link
Richard Hardy
  • 69.5k
  • 13
  • 126
  • 278
Source Link
Doug Fir
  • 1.6k
  • 1
  • 19
  • 36

Predicting online revenue next month: Time Series or Regression?

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)

  head(eg_data)
  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?