[R] ex-Gaussian survival distribution

From: Jonathan Williams <jonathan.williams_at_pharmacology.oxford.ac.uk>
Date: Tue 28 Feb 2006 - 21:08:45 EST


Dear R-Helpers,

I am hoping to perform survival analyses using the "ex-Gaussian" distribution.
I understand that the ex-Gaussian is a convolution of exponential and Gaussian
distributions for survival data.

I checked the "survreg.distributions" help and saw that it is possible to mix
pre-defined distributions. Am I correct to think that the following code makes
the ex-Gaussian:-

exGauss=survreg.distributions$exponential exGauss$name='exGaussian'
exGauss$dist=survreg.distributions$gaussian

Am I further correct to think that I can compare the fits of the ex-Gaussian and Weibull distributions to the data via:-

fit1=survreg(Surv(response)~1+frailty(unit), data=dat, dist=exGauss) fit2=survreg(Surv(response)~1+frailty(unit), data=dat, dist='weibull') anova(fit1, fit2)

Finally, am I further correct to think that the output from this anova means that
the Weibull distribution fits the data worse than the exGauss distribution that I
made?

              Terms Resid. Df    -2*LL Test       Df Deviance P(>|Chi|)
1 1 + frailty(unit)  4229.778 63129.46            NA       NA        NA
2 1 + frailty(unit)  4228.020 58426.27    = 1.757815 4703.190         0

Many thanks for your help with these questions. I have a feeling they are trivial,
but I am a psychiatrist so I need to check that I am not barking up the wrong tree
(or simply barking...)!

Jonathan Williams

PS why does "weibull" need quotes in the survreg procedure, while exGauss does not?



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 Tue Feb 28 21:21:30 2006

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:42:47 EST