I encountered some surprises when using fitted gam object to
predict based on new regressor values. It might be due to some simple
grammar mistakes.
mod <- gam(ozone^(1/3) ~ lo(radiation) + lo(wind, temperature), data =
air)
newdata <- data.frame(ozone=4,radiation=200,temperature=70,wind=8)
predict.gam(mod,data=newdata)
# why do I get 111 outputs? I expect a single output corresponding to
# the new regressors feeded.
predict.gam(mod, data=air[1,])
# still 111 outputs.
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news
|