The following two question outline how one can plot the results from a survival analysis using R. Q1 and Q2
But both of the examples assume, or more directly specify a weibull distribution fitted to the survival model.
Refering to survreg()
which is within the survival
package in R, the following are possible fitting assumptions:
- weibull
- exponential
- gaussian
- logistic
- lognormal
- loglogistic
So if we take the example from the survreg()
help.
library(survival)
data(ovarian)
head(ovarian)
survival.weibull <- survreg(Surv(time, status) ~ ph.ecog + age + strata(sex),
dist='weibull', lung)
survival.logn <- survreg(Surv(time, status) ~ ph.ecog + age + strata(sex),
dist='lognormal', lung)
survival.logl <- survreg(Surv(time, status) ~ ph.ecog + age + strata(sex),
dist='loglogistic', lung)
How can one verify the best appropriate distribution to fit. From the summary statistic we get the Loglik(model)
value. Is this the best indicator? Or is there a graphical method to visualise the best fit - I was suggested a QQ-plot may be of help.
Thanks in advance for an advice