predict.betareg {betareg}R Documentation

Prediction Method for betareg Objects

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.

Usage

## S3 method for class 'betareg':
predict(object, newdata = NULL,
  type = c("response", "link", "precision", "variance"), na.action = na.pass, ...)

Arguments

object fitted model object of class "betareg".
newdata optionally, a data frame in which to look for variables with which to predict. If omitted, the original observations are used.
type character indicating type of predictions: fitted means of response ("response"), corresponding linear predictor ("link"), fitted precision parameter phi ("precision"), or fitted variances of response ("variance").
na.action function determining what should be done with missing values in newdata. The default is to predict NA.
... currently not used.

Examples

data("GasolineYield", package = "betareg")

gy2 <- betareg(yield ~ batch + temp | temp, data = GasolineYield)

cbind(
  predict(gy2, type = "response"),
  predict(gy2, type = "link"),
  predict(gy2, type = "precision"),
  predict(gy2, type = "variance")
)

[Package betareg version 2.1-2 Index]