mario ouwens
2008-Oct-31 08:33 UTC
[R] loglogistic cumulative distribution used by survreg
Dear all, What is the cumulative distribution (with parameterization) used within survreg with respect to the log-logistic distribution? That is, how are the parameters linked to the survivor function? Best regards, Mario [[alternative HTML version deleted]]
Terry Therneau
2008-Oct-31 14:43 UTC
[R] loglogistic cumulative distribution used by survreg
> What is the cumulative distribution (with parameterization) used within > survreg with respect to the log-logistic distribution?> That is, how are the parameters linked to the survivor function?Reference: Kalbfleisch and Prentice, The statistical analysis of failure time data, chapter 2. This is the basis for survreg. Theory: Let z = (log(time) - X beta)/ scale = the transformed data. Then S(z) = 1/(1+exp(z)) = survival function. Practice: fit <- survreg(Surv(time, status) ~ ph.karno + age + sex, data=lung, dist='loglogistic') # Get the survival curve for a 60 year old male with Karnofsky score of 70 tdata <- data.frame(age=60, sex=1, ph.karno=70) stemp <- 99:1/100 xtemp <- predict(fit, newdata=tdata, type='quantile', p=1-stemp) plot(xtemp/365, stemp, xlab="Years", ylab='Survival', type='l') I purposefully did not ask for the 0th percentile, which can cause problems with the logarithm, or the 100th percentile, which is infinite (and I'd like to keep the plot to a reasonable scale). Terry Therneau
Apparently Analagous Threads
- Survreg function for loglogistic hazard estimation
- aftreg vs survreg loglogistic aft model (different intercept term)
- Teasing out logrank differences *between* groups using survdiff or something else?
- generating loglogistic distribution in R
- Survreg function for loglogistic hazard estimation