Reputation: 433
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.
Upvotes: 2
Views: 1381
Reputation: 1783
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
Upvotes: 4