Generic function that returns predicted outcomes from lm
, glm
, gbm
, wbart
,
and pbart
objects with new data.
pred(object, newdata, ...)# S3 method for lm
pred(object, newdata, ...)
# S3 method for glm
pred(object, newdata, ...)
# S3 method for gbm
pred(object, newdata, method = "OOB", ...)
# S3 method for pbart
pred(object, newdata, ...)
# S3 method for wbart
pred(object, newdata, ...)
a fitted model object, which can be of class lm
, glm
, gbm
,
wbart
, or pbart
.
a data frame containing predictor variables.
additional arguments passed to the predict
methods.
Method used to determine the optimal number of boosting iterations for gbm
objects.
a vector of expected outcomes for newdata