On Tue, 28 Feb 2006, Jonathan Williams wrote:
> 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
No. That just produces an object with some pieces from the lognormal and
some from the exponential model. All the functions described in
help(survreg.distributions) have to be written to make a new distribtuion
Also, survreg.distributions will only handle location-scale families, and
I don't think the "ex-Gaussian" is one of these.
> 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)
No. Even if the models had been fitted correctly they aren't nested
models.
-thomas
Thomas Lumley Assoc. Professor, Biostatistics
tlumley at u.washington.edu University of Washington, Seattle
> 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 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
>
Thomas Lumley Assoc. Professor, Biostatistics
tlumley at u.washington.edu University of Washington, Seattle