On Aug 30, 2012, at 4:35 PM, David Windemius wrote: >> David said my newdata data frame 'new' must have a column named 'area'. >> It did. Nonetheless predict.lm throws an error with type = "terms" and >> newdata = new. I see nothing in the predict.lm documentation that >> bars this usage. Is there a bug? > > After correcting the error in your definition of the 'area' vector I > get no error from predict.lm().
> David. What error did you correct? The newdata data frames in my examples have been pretty simple, and have defined the 'area' vector simply, for instance, new <- data.frame(area = c(8172, 10220, 11570, 24150)) new # area # 1 8172 # 2 10220 # 3 11570 # 4 24150 Is something wrong with this? Were you able to make predict.lm work with newdata = new and type = "terms"? -John -- View this message in context: http://r.789695.n4.nabble.com/predict-lm-type-terms-question-tp4641665p4641947.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ 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.