title: Predicting values using an OLS model with statsmodels
body: <p>I calculated a model using OLS (multiple linear regression). I divided my data to train and test (half each), and then I would like to predict values for the 2nd half of the labels.</p>
  
  <pre><code>model = OLS(labels[:half], data[:half])
  predictions = model.predict(data[half:])
  </code></pre>
  
  <p>The problem is that I get and error:
      File "/usr/local/lib/python2.7/dist-packages/statsmodels-0.5.0-py2.7-linux-i686.egg/statsmodels/regression/linear_model.py", line 281, in predict
      return np.dot(exog, params)
      ValueError: matrices are not aligned</p>
  
  <p>I have the following array shapes:
  data.shape: (426, 215)
  labels.shape: (426,)</p>
  
  <p>If I transpose the input to model.predict, I do get a result but with a shape of (426,213), so I suppose its wrong as well (I expect one vector of 213 numbers as label predictions):</p>
  
  <pre><code>model.predict(data[half:].T)
  </code></pre>
  
  <p>Any idea how to get it to work?</p>