Prediction Methods for robustbetareg Objects Class
Prediction Methods for robustbetareg Objects Class
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.
predict( object, newdata =NULL, type = c("response","link","precision","variance","quantile"), at =0.5,...)
Arguments
object: fitted model object of class "robustbetareg".
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 ("response"), corresponding linear predictor ("link"), fitted precision parameter phi ("precision"), fitted variances of response ("variance"), or fitted quantile(s) of the response distribution ("quantile").
at: numeric vector indicating the level(s) at which quantiles should be predicted (only if type = "quantile"). Default is the median at = 0.5.
...: currently not used.
Returns
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)))