Learn R Programming

betareg (version 1.2.1)

predict.betareg: Predicted values from beta regression model.

Description

This function returns predictions from a fitted betareg object..

Usage

predict.betareg(object, newdata = NULL, type = c("link", "response"), ... )

Arguments

object
fitted model using betareg
newdata
optionally, a data frame in which to look for variables with which to predict. If omitted, the fitted linear predictors are used.
type
the type of prediction required. The default is on the scale of the linear predictors; the alternative '"response"' is on the scale of the response variable.
...
Optional arguments

References

FERRARI, S.L.P., CRIBARI-NETO, F. (2004). Beta regression for modeling rates and proportions. Journal of Applied Statistics, v. 31, n. 7, p. 799-815.

See Also

betareg, br.fit, summary.betareg, residuals.betareg

Examples

Run this code
data(pratergrouped)
fit <- betareg(oil ~ batch1 + batch2 + batch3 + batch4 + batch5 + 
batch6 + batch7 + batch8 + batch9 + temp, data=pratergrouped)
summary(fit)
new <- data.frame(x = cbind(0,1,1,0,1,0,1,1,1,201))
predict(fit)
predict(fit,new)
predict(fit,new,type="response")

Run the code above in your browser using DataLab