> 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

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to