chjackson / flexsurv

The flexsurv R package for flexible parametric survival and multi-state modelling
http://chjackson.github.io/flexsurv/
55 stars 27 forks source link

quantile definition #57

Closed topepo closed 5 years ago

topepo commented 6 years ago

?summary.flexsurvreg has

"quantile" for quantiles of the survival time distribution.

The values are decreasing over the quantile though.

library(flexsurv)
#> Loading required package: survival
fs1 <- flexsurvreg(Surv(recyrs, censrec) ~ group, data = bc, dist = "weibull")
summary(fs1, head(bc, 1), type = "quantile", quantiles = (1:9)/10)
#> group=Good 
#>   quantile       est       lcl       ucl
#> 1      0.1 20.908184 16.275891 27.000266
#> 2      0.2 16.127857 12.722296 20.535784
#> 3      0.3 13.067953 10.422573 16.484203
#> 4      0.4 10.721508  8.612247 13.409123
#> 5      0.5  8.757940  7.102589 10.843725
#> 6      0.6  7.019804  5.735314  8.629701
#> 7      0.7  5.410693  4.437209  6.622421
#> 8      0.8  3.851372  3.158536  4.709601
#> 9      0.9  2.235588  1.804118  2.781502

I would interpret the last line to mean that, for this sample being predicted, 90% of the survival time distribution is less than 2.235588.

This is with flexsurv 1.1.1.

chjackson commented 5 years ago

Fixed in [8e6cc7b] - thanks.