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

2003-06-10 Thread Adelchi Azzalini
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  [EMAIL PROTECTED]
Dipart.Scienze Statistiche, Universit? di Padova, Italia
http://azzalini.stat.unipd.it/

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help

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

2003-06-10 Thread Prof Brian Ripley
An exponential distribution is a gamma distribution, and as far as fitting
the MLE of the coefficients all gammas give the same MLEs.  (You can
specify the dispersion and hence that the gamma is exponential when asking
for summaries, anova, etc.)

On Wed, 11 Jun 2003, Masayoshi Hayashi wrote:

 I am learning glm function, but how do you fit data using exponential
 distribution with glm?
 In the help file, under Family Objects for Models, no ready made option
 seems available for the distribution as well as for other distributions
 satisfying GLM requirements not listed there.

Which ones did you have in mind?  The only other commonly used
distribution which gives a glm is the negative binomial with fixed shape, 
for which see the MASS book and package.

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help