[R] glm with a distribution free family

Spencer Graves spencer.graves at pdf.com
Sun Jun 5 00:25:51 CEST 2005


	  Have you considered computing and plotting sample averages and 
variances for different subgroups of the data then plotting variances 
vs. averages?  This was suggested by Fahrmeir and Tutz (2001) 
Multivariate Statistical Modeling Based on Generalized Linear Models, 
2nd ed. (Springer, Example 2.7, p. 59-60).  This analysis led them to 
consider variance(mu) = phi*mu, phi*mu^2 and mu+theta*mu^2 for a 
particular example.  The variance function mu+theta*mu^2 corresponds to 
the negative binomial distribution, as noted by McCullagh and Nelder 
(1989) Generalized Linear Models, 2nd 3d. (Chapman & Hall, Table 9.1, p. 
326).  A family function "negative.binomial" is included in 
library(MASS) and discussed in Venables and Ripley (2002) Modern Applied 
Statistics with S, 4th ed. (Springer, sec. 7.4, pp. 206-208).  R script 
to perform this and other analyses in the first 60 pages of Fahrmeir and 
Tutz (2001) is attached, utilizing library(Fahrmeir) supported by Kjetil 
Halvorsen, who helped me with the attached.  The r-help server will 
probably remove the attachment, but it should reach you, Leatitia, and 
Kjetil.  Kjetil suggested he might include something like this is an 
update to library(Fahrmeir), perhaps in a "demo" subdirectory. 
Therefore, others interested in this might check there first and ping me 
and Kjetil if they don't find it on CRAN.

	  I wish to thank Kjetil for his help with similar questions earlier -- 
and for maintaining the "Farhmeir" package on CRAN.  I could not have 
answered this question 24 hours ago.

	  Best Wishes,
	  spencer graves	

Laetitia Mestdagh wrote:

> Dear R users,
>  
> I am trying to fit a glm with a distribution free family, link = log 
and variance = constant*mu. I guess I have to use the quasi family but
the choices of variance are restricted to constant or mu or mu^2..., I
don't know the way to choose the variance that I need, i.e. constant*mu.
> If you have any ideas or advice, please tell me.
> Thanks,
>  
> Laetitia Mestdagh
> 
> 
> Laetitia Mestdagh
> élève en 3ème année a l'ISUP( Université de Paris VI)
> 13 rue Ernest Chamblain
> 91250 St Germain les Corbeil
> Tel : 01 69 89 28 15
> Portable : 06 18 44 53 26
> 		
> ---------------------------------
> 
> ils, photos et vidéos !
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> 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


More information about the R-help mailing list