predict_reest: Predictions Using Re-estimated Model

View source: R/predict.R

predict_reestR Documentation

Predictions Using Re-estimated Model

Description

Function to obtain predictions using the re-estimated model.

Usage

predict_reest(object, ...)

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

Arguments

object

An object for which predictions are meaningful. E.g. an object of class 'glmsmurf', typically the result of a call to glmsmurf or glmsmurf.fit.

...

Additional arguments which are currently ignored.

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.

Value

A vector containing the predicted values using the re-estimated model in object, when this is available, or, otherwise, the predicted values using the estimated model in object with a warning.

See Also

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

Examples

## See example(glmsmurf) for examples
          

smurf documentation built on March 31, 2023, 7:52 p.m.