title: Forecasting multivariate data with Auto.arima
body: <p>I am trying to forecasts sales of weekly data. The data consists of these variables  week no, sales, avgprice/perunit , holiday(whether that week contains holiday or not) and promotion(if any promotion is going) of 104 weeks. So basically the  last 6 obs of data set looks as:</p>
  
  <pre><code> Week     Sales       Avg.price.unit Holiday    Promotion
  
    101     8,970             50       0         1
  
    102    17,000             50       1         1
  
    103    23,000             80       1         0
  
    104    28,000            180       1         0
  
    105                      176       1         0
  
    106                      75        0         1
  </code></pre>
  
  <p>Now I want to forecast for 105th and 106th week. So I created univariate time series x by using ts function and then ran auto.arima function by issuing the command:</p>
  
  <pre><code>x&lt;-ts(sales$Sales, frequency=7)
  &gt;  fit&lt;-auto.arima(x,xreg=external, test=c("kpss","adf","pp"),seasonal.test=c("ocsb","ch"),allowdrift=TRUE)
  &gt;fit
  ARIMA(1,1,1)                    
  
  **Coefficients:
            ar1      ma1  Avg.price.unit   Holiday  Promotion
  
        -0.1497  -0.9180          0.0363  -10.4181    -4.8971
  
  s.e.   0.1012   0.0338          0.0646    5.1999     5.5148
  
  sigma^2 estimated as 479.3:  log likelihood=-465.09
  AIC=942.17   AICc=943.05   BIC=957.98**
  </code></pre>
  
  <p>Now when I want to forecast the values for last 2 weeks(105th and 1o6th) I supply the external values of regressors for 105th and 106th week:</p>
  
  <pre><code>forecast(fit, xreg=ext)
  
  where ext consists of future values of regressors for last 2 weeks.
  
  The output comes as:
  
   Point         Forecast    Lo 80    Hi 80    Lo 95    Hi 95
  
  15.85714       44.13430 16.07853 72.19008 1.226693 87.04191
  
  16.00000       45.50166 17.38155 73.62177 2.495667 88.50765
  </code></pre>
  
  <p>The output looks incorrect since the forecasted value of sales is very less as the sales value of previous values(training) values are generallly in range of thousands.</p>
  
  <p>If anyone can tell me why it is coming incorrect/unexpected, that would be great.</p>