Gorjanc Gregor
2005-Aug-10 11:42 UTC
[R] Exponential, Weibull and log-logistic distributions in glm()
Dear R-users! I would like to fit exponential, Weibull and log-logistic via glm() like functions. Does anyone know a way to do this? Bellow is a bit longer description of my problem. Hm, could family() be adjusted/improved/added to allow for these distributions? SAS procedure GENMOD alows to specify deviance and variance functions to help in such cases. I have not tried that option and I do not know how does it work. I do not expect that others will do the job, although it would not harm ;) Thanks in advance! I fully understand that all mentioned distributiones are available through "survival" functions in various packages but I don't have data that correspond fully to survival data. I have data on some cell parameters, which show cell vitality. These data are highly skewed and I have therefore modeled them via log-normal and gamma in glm(). Based on deviance residuals, gamma seems to fit better. By the way, are there any other means of chosing the right disribution for GLM? However, some references from field of this data suggested that Weibull might be better and I would like to try this, as well as with exponential and log-logistic. Of course, author in that paper did not say how they performed the analyses, but I guess they took each group (several group were compared) separately and estimated parameters for distribution, say Weibull, via maximum likelhood. I do not like this approach, since not all data are used in one run, and would like to use model to get parameter estimates and perform inference. With Weibull I am aware that it does not fit in exponential family, unless one is read to specify a value/estimate for one parameter. Any comment are welcome! Lep pozdrav / With regards, Gregor Gorjanc ---------------------------------------------------------------------- University of Ljubljana Biotechnical Faculty URI: http://www.bfro.uni-lj.si/MR/ggorjan Zootechnical Department mail: gregor.gorjanc <at> bfro.uni-lj.si Groblje 3 tel: +386 (0)1 72 17 861 SI-1230 Domzale fax: +386 (0)1 72 17 888 Slovenia, Europe ---------------------------------------------------------------------- "One must learn by doing the thing; for though you think you know it, you have no certainty until you try." Sophocles ~ 450 B.C.
Thomas Lumley
2005-Aug-10 14:41 UTC
[R] Exponential, Weibull and log-logistic distributions in glm()
On Wed, 10 Aug 2005, Gorjanc Gregor wrote:> Dear R-users! > > I would like to fit exponential, Weibull and log-logistic via glm() like > functions. Does anyone know a way to do this? Bellow is a bit longer > description of my problem.I think you want to use survreg(). It will still work when there is no censoring. Adding these families to glm() would be difficult. They are really not generalized linear models in any of the useful senses: not exponential families, don't have estimating functions linear in the response variable, not fitted by iteratively reweighted least squares. -thomas
Gorjanc Gregor
2005-Aug-12 11:34 UTC
[R] Exponential, Weibull and log-logistic distributions in glm()
>> Dear R-users! >> >> I would like to fit exponential, Weibull and log-logistic via glm() like >> functions. Does anyone know a way to do this? Bellow is a bit longer >> description of my problem. > > I think you want to use survreg(). It will still work when there is no > censoring. > > > Adding these families to glm() would be difficult. They are really not > generalized linear models in any of the useful senses: not exponential > families, don't have estimating functions linear in the response > variable, not fitted by iteratively reweighted least squares.Thank you very much for the response. I didn't want to get into survival since this is really not my field, but it seems that providing those distributions in glm() is not so easy as I thought. Based on your hint I tried with survreg and estimates seems reasonable. best, Gregor
Reasonably Related Threads
- Fitting weibull and exponential distributions to left censoring data
- Fitting weibull, exponential and lognormal distributions to left-truncated data.
- [Fwd: Re: levels for list and data.frame]
- Fwd: Extract just some fields from XML]
- Re: [Rd] corrupt data frame: columns will be truncated or padded with NAs in: format.data.frame(x, digits = digits)