This function is generic (see Methods); method functions can be written to handle specific classes of data. Classes which already have methods for this function include: factanal, gam, glm, lm, loess, mlm, princomp, smooth.spline, tree.
predict(object, ...)
# extract the fitted linear predictor from a glm object glmob <- glm(Kyphosis ~ poly(Age, 2) + (Number > 5)*Start, family = binomial, data = kyphosis) predict(glmob)predict(gamob, newdata, type = "terms")