> Of course I can extend the new dataframe with a few thousands 
> NAs, but is there a more elegant solution?
That should not be necessary: predict.lm should work on any number of newdata 
rows, whether longer or shorter than the original data set.

However, the help page for predict.lm says (among other things)

    "If the fit is rank-deficient, some of the columns of the design
     matrix will have been dropped.  Prediction from such a fit only
     makes sense if 'newdata' is contained in the same subspace as the
     original data.  That cannot be checked accurately, so a warning is
     issued."

Could that be the situation you are in? If it is, it's not the new data that 
causes the problem, but the original fit.

S Ellison

*******************************************************************
This email and any attachments are confidential. Any use...{{dropped:8}}

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to