Re: [R] glm with a distribution free family

From: Spencer Graves <spencer.graves_at_pdf.com>
Date: Sun 05 Jun 2005 - 08:25:51 EST

          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@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



R-help@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 Received on Sun Jun 05 08:36:19 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:22 EST