smurf (version 1.0.6)

predict.glmsmurf: Predictions Using Estimated Model

Description

Function to obtain predictions using the estimated model.

Usage

# S3 method for glmsmurf
predict(
  object,
  newdata = NULL,
  newoffset = NULL,
  type = c("link", "response", "terms"),
  ...
)

Arguments

object

An object of class 'glmsmurf', typically the result of a call to glmsmurf or glmsmurf.fit.

newdata

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.

newoffset

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

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.

Value

A vector containing the predicted values using the estimated model in object.

See Also

predict_reest, predict.glm, predict, glmsmurf, glmsmurf-class

Examples

Run this code
# NOT RUN {
## See example(glmsmurf) for examples
         
# }

Run the code above in your browser using DataLab