[R] fitting data to exponential distribution with glm
azzalini at stat.unipd.it
Tue Jun 10 17:47:57 CEST 2003
On Tuesday 10 June 2003 17:31, Masayoshi Hayashi wrote:
> I am learning glm function, but how do you fit data using exponential
> distribution with glm?
The Gamma family is parametrised in glm() by two parameters:
mean and dispersion; the "dispersion" regulates the shape.
So must fit a GLM with the Gamma family, and then produce a "summary"
with dispersion parameter set equal to 1, since this value
corresponds to the exponential distribution in the Gamma family.
fit <- glm(formula =..., family = Gamma)
Adelchi Azzalini <azzalini at stat.unipd.it>
Dipart.Scienze Statistiche, Universit? di Padova, Italia
More information about the R-help