title: How to predict with with nlme::predict.lme without calling the whole 'object'
body: <p>Using <code>lme</code> function, I fitted a model on a large data set with near 470K observations and about 40 variables. The size of this fit (<code>object.size(fit)</code>) is near 300 Mb, which is not feasible to store in a server. The goal is to let a user to interactively define a <code>newdata</code> (which has a maximum of 500 observations) and then call <code>predict(fit, newdata, level = 0, na.action = na.omit)</code> to output the predicted values. The question is how I can reduce the size of the <code>fit</code> given a limited storage space in the server?  </p>
  
  <p>Have already tried a couple of ways in <a href="https://stackoverflow.com/questions/21896265/how-to-minimize-size-of-object-of-class-lm-without-compromising-it-being-passe/22008431#22008431">this post</a> but it does not shrink the size down to what I really need.  </p>
  
  <p>Any thought? Thanks!</p>
  
  <hr>