title: Create lm object from data/coefficients
body: <p>Does anyone know of a function that can create an lm object given a dataset and coefficients?</p>
  
  <p>I'm interested in this because I started playing with Bayesian model averaging (BMA) and I'd like to be able to create an lm object out of the results of bicreg.  I'd like to have access to all of the nice generic lm functions like diagnostic plotting, predict, cv.lm etc.</p>
  
  <p>If you are pretty sure such a function doesn't exist that's also very helpful to know!</p>
  
  <pre><code>library(BMA)
  mtcars_y &lt;- mtcars[, 1] #mpg
  mtcars_x &lt;- as.matrix(mtcars[,-1])
  res &lt;- bicreg(mtcars_x, mtcars_y)
  
  summary(res)
  res$postmean # bma coefficients
  
  # The approximate form of the function
  # I'm looking for
  lmObject &lt;- magicFunction(data=mtcars, coefficients=res$postmean)
  </code></pre>