Function to obtain predictions using the estimated model.
# S3 method for glmsmurf
predict(
object,
newdata = NULL,
newoffset = NULL,
type = c("link", "response", "terms"),
...
)A vector containing the predicted values using the estimated model in object.
An object of class 'glmsmurf', typically the result of a call to glmsmurf or glmsmurf.fit.
Optionally, a data frame containing the predictors used in the prediction.
This can only be used when object contains a formula.
When newdata is omitted, the predictions are based on the data used to fit the model in object.
Optionally, a vector containing a new offset to be used in the prediction.
When newoffset is omitted, the predictions use the offset which was used to fit the model in object.
Type of prediction. The default is on the scale of the linear predictors ("link").
Another option is on the scale of the response variable ("response").
For type "terms" a matrix containing the fitted values of each term in the model, on the linear predictor scale, is returned.
Additional arguments which are currently ignored.
predict_reest, predict.glm, predict,
glmsmurf, glmsmurf-class
## See example(glmsmurf) for examples
Run the code above in your browser using DataLab