Skip to main content
added 97 characters in body
Source Link
DWin
  • 7.8k
  • 23
  • 35

In R,The way to get times for particular probabilities rather than probability for particular time you need the Royston-Parmar model(s) can be calculated with functions ininverse of the survival function which is the quantile function. The flexsurv package. It also includes a qsurvspline function gives a quantile functional. So computing the survival time for a 50% survival should be fairly straightforward.

?qsurvspline

However that doesn't seem to take a model argument and apparently only handles the simplest of cases. Looking at the help page for flexsurv we see that there is a summary function that can derive quantiles,and it does accept your model argument:

summary(mod, type="quantile", quantiles=0.5)
 
  quantile      est      lcl      ucl
1      0.5 319.1645 280.6714 364.0389

In R, the Royston-Parmar model(s) can be calculated with functions in the flexsurv package. It also includes a qsurvspline function gives a quantile functional. So computing the survival time for a 50% survival should be fairly straightforward.

?qsurvspline

However that doesn't seem to take a model argument and apparently only handles the simplest of cases. Looking at the help page for flexsurv we see that there is a summary function that can derive quantiles,and it does accept your model argument:

summary(mod, type="quantile", quantiles=0.5)
 
  quantile      est      lcl      ucl
1      0.5 319.1645 280.6714 364.0389

The way to get times for particular probabilities rather than probability for particular time you need the inverse of the survival function which is the quantile function. The flexsurv package also includes a qsurvspline function gives a quantile functional. So computing the survival time for a 50% survival should be fairly straightforward.

?qsurvspline

However that doesn't seem to take a model argument and apparently only handles the simplest of cases. Looking at the help page for flexsurv we see that there is a summary function that can derive quantiles,and it does accept your model argument:

summary(mod, type="quantile", quantiles=0.5)
 
  quantile      est      lcl      ucl
1      0.5 319.1645 280.6714 364.0389
Source Link
DWin
  • 7.8k
  • 23
  • 35

In R, the Royston-Parmar model(s) can be calculated with functions in the flexsurv package. It also includes a qsurvspline function gives a quantile functional. So computing the survival time for a 50% survival should be fairly straightforward.

?qsurvspline

However that doesn't seem to take a model argument and apparently only handles the simplest of cases. Looking at the help page for flexsurv we see that there is a summary function that can derive quantiles,and it does accept your model argument:

summary(mod, type="quantile", quantiles=0.5)
 
  quantile      est      lcl      ucl
1      0.5 319.1645 280.6714 364.0389