2

I'm trying to plot parametric survival curves for lognormal, exponential,log logistic and weibull distributions using AFT models.

Following is the toy example:

library(survival)
library(ISwR)
require(flexsurv)

ln.curves  <- flexsurvreg(Surv(days, status == 1)~1,dist='lnorm',data=melanom)
ln.curves

wb.curves  <- flexsurvreg(Surv(days, status == 1)~1,dist='weibull',data=melanom)
wb.curves

exp.curves  <- flexsurvreg(Surv(days, status == 1)~1,dist='exponential',data=melanom)
exp.curves

ll.curves  <- flexsurvreg(Surv(days, status == 1)~1,dist='llogis',data=melanom)
ll.curves

How would I pragmatically create survival function ? for example I would like to create a survival function for the following time sequenct.

t <- seq(1:5000)

I attempted to do this for log normal distribution, The parameters for log normal curves are:

Estimates: 
         est    L95%   U95%   se   
meanlog  8.670  8.302  9.038  0.188
sdlog    1.483  1.201  1.830  0.159

t <- seq(1:5000)
lnorm.plot <- 1 - plnorm(t, meanlog = 8.670,sdlog=1.483)
plot(lnorm.plot)

Below are my questions:

  1. Is my log normal curve plot correct?
  2. How to plot the same for exponential, weibull and loglogistic distribution?
Cœur
  • 37,241
  • 25
  • 195
  • 267
forecaster
  • 1,084
  • 1
  • 14
  • 35

0 Answers0