Re: [R] fitting data to exponential distribution with glm

About this list Date view Thread view Subject view Author view Attachment view

From: Adelchi Azzalini (azzalini@stat.unipd.it)
Date: Wed 11 Jun 2003 - 01:47:57 EST


Message-id: <20030610154804.206997CA824@tango.stat.unipd.it>

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.

In practice:

fit <- glm(formula =..., family = Gamma)
summary(fit,dispersion=1)

best wishes,

Adelchi Azzalini

-- 
Adelchi Azzalini  <azzalini@stat.unipd.it>
Dipart.Scienze Statistiche, Universit? di Padova, Italia
http://azzalini.stat.unipd.it/

______________________________________________ R-help@stat.math.ethz.ch mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Tue 01 Jul 2003 - 09:11:53 EST