title: Back Test ARIMA model with Exogenous Regressors
body: <p>Is there a way to create a holdout/back test sample in following ARIMA model with exogenous regressors. Lets say I want to estimate the following model using the first 50 observations and then evaluate model performance on the remaining 20 observations where the x-variables are pre-populated for all 70 observations. What I really want at the end is a graph that plots actual and fitted values in development period and validation/hold out period (also known as Back Testing in time series)</p>
  
  <pre><code>library(TSA)
  
  xreg &lt;- cbind(GNP, Time_Scaled_CO)  # two time series objects 
  
  fit_A &lt;- arima(Charge_Off,order=c(1,1,0),xreg) # Charge_Off is another TS object
  
  plot(Charge_Off,col="red")
  
  lines(predict(fit_A, Data),col="green")  #Data contains Charge_Off, GNP, Time_Scaled_CO  
  </code></pre>