[R] GLM for Beta distribution

Thomas Lumley tlumley at u.washington.edu
Wed Feb 19 14:42:03 CET 2003

On Wed, 19 Feb 2003, Sharon Kuhlmann-Berenzon wrote:

> Hi R-help,
> Is there such a thing as a function in R for fitting a GLM where the
> response is distributed as a Beta distribution?
> In my case, the response variable is a percentage ([0,1] and continuous).
> The current glm() function in R doesn't include the Beta distribution.

That's because they aren't generalised linear models.

Two simple possibilities

 - use the quasibinomial variance and an appropriate link such as logit in
glm -- there's an example in McCullagh & Nelder that tries this (though
they decide in the end that it doesn't fit their data very well)

 - Take logits and model with linear regression: a lot of beta
distributions are fairly similar to logit-normal distributions.

Or you could write down the loglikelihood and use nlm() or optim() to
maximise it.


More information about the R-help mailing list