title: stepAIC function with tslm function in R
body: <p>I wish to forecast a time series and so I use something like this :</p>
  
  <p>Suppose I have a data <code>xtrain</code> with <code>V1,V2,V3,V4</code> as the attributes. Then I will create a model as follows:</p>
  
  <pre><code>form=as.formula(train ~ trend + season + V1 + V2 + V3 + V4)
  
  mod = tslm(form,data=xtrain)
  </code></pre>
  
  <p>And now I wish to use <code>stepAIC</code>,</p>
  
  <pre><code>step = stepAIC(mod, direction = "both", trace = F)
  </code></pre>
  
  <p>but here, I get an error like: </p>
  
  <pre><code>Error in [.default (x, , jj, drop = FALSE) : incorrect number of dimensions
  </code></pre>
  
  <p>How should <code>stepAIC</code> be used with <code>tslm</code> function?</p>