Description Usage Arguments Details Value Examples
Wrapper to built in survival functions
1 
t 
double, time point where the survival is to be evaluated at. 
distPars 

dist 
character name of the builtin distribution, see details. 
The function wraps all builtinsurvival distributions. User can choose
between the weibull
, gamma
, gengamma
(generalized gamma)
and burr
(Burr type XII distribution). It is the user responsibility
to pass the appropriate list of parameters as follows:
scale
(the scale) and shape
(the shape)
parameters.
scale
(the scale) and shape1
(the shape1) and
shape2
(the shape2) parameters.
scale
(the scale) and shape
(the shape)
parameter.
mu
(location), sigma
(scale) and Q
(shape) parameters.
a double giving the value of the survival function at time point
t
at the parameters' values.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22  tt < 2.5
## weibull
distP < list(scale = 1.2, shape = 1.16)
alpha < exp(log(distP[["scale"]]) / distP[["shape"]])
pweibull(q = tt, scale = alpha, shape = distP[["shape"]],
lower.tail = FALSE)
surv(tt, distP, "weibull") ## (almost) same
## gamma
distP < list(shape = 0.5, rate = 1.0 / 0.7)
pgamma(q = tt, rate = distP[["rate"]], shape = distP[["shape"]],
lower.tail = FALSE)
surv(tt, distP, "gamma") ## (almost) same
## generalized gamma
distP < list(mu = 0.5, sigma = 0.7, Q = 0.7)
flexsurv::pgengamma(q = tt, mu = distP[["mu"]],
sigma = distP[["sigma"]],
Q = distP[["Q"]],
lower.tail = FALSE)
surv(tt, distP, "gengamma") ## (almost) same

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.