[R] predict.lm(...,type="terms") question

jjthaden jjthaden at flash.net
Fri Aug 31 22:48:27 CEST 2012


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.




More information about the R-help mailing list