title: Forecasting multiple variable time series in R
body: <p>I am trying to forecast three variables using R, but I am running into issues on how to deal with correlation. </p>
  
  <p>The three variables I am trying to forecast are Revenue, Subscriptions and Price.  </p>
  
  <p>My initial approach was to do two independent time series forecast of subscriptions and price and multiply the outcomes to generate the revenue forecast. </p>
  
  <p>I wanted to understand if this approach makes sense, as there is an inherent correlation between the price and the subscribers, and this is the part I do not know how to deal with. </p>
  
  <pre><code># Load packages.
  library(forecast)
  
  # Read data
  data &lt;- read.csv("data.csv")
  data.train &lt;- data[0:57,]
  data.test &lt;- data[58:72,]
  
  # Create time series for variables of interest
  data.subs &lt;- ts(data.train$subs, start=c(2014,1), frequency = 12)
  data.price &lt;- ts(data.train$price, start=c(2014,1), frequency = 12)
  
  #Create model
  subs.stlm &lt;- stlm(data.subs)
  price.stlm &lt;- stlm(data.price)
  
  #Forecast
  subs.pred &lt;- forecast(subs.stlm, h = 15, level = c(0.6, 0.75, 0.9))
  price.pred &lt;- forecast(price.stlm, h = 15, level = c(0.6, 0.75, 0.9))
  </code></pre>
  
  <p>Any help is greatly appreciated! </p>