predict {robustbetareg} | R Documentation |
Prediction Methods for robustbetareg Objects Class
Description
Extract various types of predictions from beta regression models: either on
the scale of responses in (0, 1) or the scale of the linear predictor,
from robustbetareg
objects.
Usage
predict(
object,
newdata = NULL,
type = c("response", "link", "precision", "variance", "quantile"),
at = 0.5,
...
)
Arguments
object |
fitted model object of class " |
newdata |
optional, a data frame with new predictor values. If omitted, the original predictors are used. |
type |
character indicating type of predictions: fitted means of response
(" |
at |
numeric vector indicating the level(s) at which quantiles should be
predicted (only if |
... |
currently not used. |
Value
Return a vector with the predicted values.
Examples
get(data("HIC", package = "robustbetareg"))
hic <- robustbetareg(HIC ~ URB + GDP | 1, data = HIC, alpha = 0.04)
cbind(predict(hic, type = "response"), predict(hic, type = "quantile", at = c(0.25, 0.5, 0.75)))