How can I fit a Beta regression in R?

862 Views Asked by At

I'm a beginner with R, and I have a vector distributed according to Beta distribution. I would like to fit a regression using this data and two explanatory variables. I don't know the appropriate syntax though.

1

There are 1 best solutions below

0
On

You can use the betareg package. Below is an example, with two explanatory variables batch and temp:

install.packages("betareg")
library(betareg)
data("GasolineYield", package = "betareg")
gy <- betareg(yield ~ batch + temp, data = GasolineYield)
summary(gy)

There's a paper on how it works here: https://cran.r-project.org/web/packages/betareg/vignettes/betareg.pdf

And full documentation, including examples here: https://cran.r-project.org/web/packages/betareg/betareg.pdf