title: Error in using the predict() function
body: <p>Shall I convert the output of <code>ar.ols</code> to be some type that <code>predict</code> can accept?</p>
  
  <pre><code>y=rnorm(100, 0,1)
  z=rnorm(100, 0,1)
  yz=cbind(y,z)
  &gt; output = ar.ols(yz, aic = F, order.max = 2, demean = F, intercept = T)    
  &gt; predict(output, n.ahead = 2, se.fit = F)
  
  x=as.data.frame(yz) # x is a data frame, and otherwise same as yz. 
  &gt; output = ar.ols(x, aic = F, order.max = 2, demean = F, intercept = T)    
  &gt; predict(output, n.ahead = 2, se.fit = F)
  Error in array(STATS, dims[perm]) : 'dims' cannot be of length 0
  </code></pre>
  
  <p>Thanks!</p>