[R] glm gamma scale parameter

WILLIE, JILL JILWIL at SAFECO.com
Tue Feb 6 22:13:56 CET 2007


Thank you.  You are correct, the shape parameter is what I need to
change & I think I see how to use the MASS package to do it...or if not,
at least I have enough now to figure it out.

A question to reconcile terminology which will speed me up, if you have
time to help me a bit more: phi = 'scale parameter' vs. 'dispersion
parameter' vs. 'shape parameter'?  Excerpt below from the R intro.
manual defining phi & the stats compliment discussion.

R intro:

distribution of y is of the form 
f_Y(y; mu, phi) = 
 exp((A/phi) * (y lambda(mu) - gamma(lambda(mu))) + tau(y, phi))
     
where phi is a scale parameter (possibly known), and is constant for all
observations, A represents a prior weight, assumed known but possibly
varying with the observations, and $\mu$ is the mean of y. So it is
assumed that the distribution of y is determined by its mean and
possibly a scale parameter as well. 


Statistics Complements to Modern Applied Statistics with S, Fourth
edition By W. N. Venables and B. D. Ripley Springer: 

7.6 Gamma models
The role of dispersion parameter for the Gamma family is rather
different. This is a parametric family which can be fitted by maximum
likelihood, including its shape parameter 


Jill Willie 
Open Seas
Safeco Insurance
jilwil at safeco.com 


-----Original Message-----
From: Prof Brian Ripley [mailto:ripley at stats.ox.ac.uk] 
Sent: Tuesday, February 06, 2007 12:25 PM
To: WILLIE, JILL
Cc: r-help at stat.math.ethz.ch
Subject: Re: [R] glm gamma scale parameter

On Tue, 6 Feb 2007, Prof Brian Ripley wrote:

> I think you mean 'shape parameter'.  If so, see the MASS package and 
> ?gamma.shape.

Also http://www.stats.ox.ac.uk/pub/MASS4/#Complements
leads to several pages of discussion.

>
> glm() _is_ providing you with the MLE of the scale parameter, but
really no 
> estimate of the shape (although summary.glm makes use of one).
>
>
> On Tue, 6 Feb 2007, WILLIE, JILL wrote:
>
>> I would like the option to specify alternative scale parameters when
>> using the gamma family, log link glm.  In particular I would like the
>> option to specify any of the following:
>> 
>> 1.  maximum likelihood estimate
>> 2.  moment estimator/Pearson's
>> 3.  total deviance estimator
>> 
>> Is this easy?  Possible?
>> 
>> In addition, I would like to know what estimation process (maximum
>> likelihood?) R is using to estimate the parameter if somebody knows
that
>> off the top of their head or can point me to something to read?
>> 
>> I did read the help & search the archives but I'm a bit confused
trying
>> to reconcile the terminology I'm used to w/R terminology as we're
>> transitioning to R, so if I missed an obvious way to do this, or
stated
>> this question in a way that's incomprehensible, my apologies.
>> 
>> Jill Willie
>> Open Seas
>> Safeco Insurance
>> jilwil at safeco.com
>> 
>> ______________________________________________
>> R-help at stat.math.ethz.ch mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide 
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>> 
>
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
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, UK                Fax:  +44 1865 272595



More information about the R-help mailing list