[prev in list] [next in list] [prev in thread] [next in thread]
List: r-help
Subject: [R] ex-Gaussian survival distribution
From: "Jonathan Williams" <jonathan.williams () pharmacology ! oxford ! ac ! uk>
Date: 2006-02-28 10:08:45
Message-ID: NGBBKJEMOMLJFCOIEGCEKEINJPAA.jonathan.williams () pharm ! ox ! ac ! uk
[Download RAW message or body]
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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic