Compute the predictions using the reference model, that is, compute the expected value for the next observation, or evaluate the log-predictive density at a given point.

# S3 method for refmodel
predict(object, znew, ynew = NULL, offsetnew = NULL,
weightsnew = NULL, type = "response", ...)

## Arguments

object The object of class refmodel. Matrix of predictor values used in the prediction. New (test) target variables. If given, then the log predictive density for the new observations is computed. Offsets for the new observations. By default a vector of zeros. Weights for the new observations. For binomial model, corresponds to the number trials per observation. Has effect only if ynew is specified. By default a vector of ones. Scale on which the predictions are returned. Either 'link' (the latent function value, from -inf to inf) or 'response' (the scale on which the target y is measured, obtained by taking the inverse-link from the latent value). Currently ignored.

## Value

Returns either a vector of predictions, or vector of log predictive densities evaluated at ynew if ynew is not NULL.