[R] ex-Gaussian survival distribution

Jonathan Williams jonathan.williams at pharmacology.oxford.ac.uk
Tue Feb 28 11:08:45 CET 2006


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?




More information about the R-help mailing list