Create a Survdef Object for a Weibull Distribution

survdefWeibull(shape, scale)

Arguments

shape

the shape parameter for the Weibull distribution. Parametrization is according to built-in R functions for the Weibull distribution, see ?Weibull for more information.

scale

the scale parameter for the Weibull distribution.

Value

a list with components:

S

a vectorized function that takes time as input and returns the survival probability at that time

h

a vectorized function that takes time as input and returns the hazard at that time

Examples

survdefWeibull(shape = 1.05, scale = 8573)
#> $S #> function (t) #> pweibull(t, shape = shape, scale = scale, lower.tail = F) #> <environment: 0x7fb6660a08d8> #> #> $h #> function (t) #> dweibull(t, shape = shape, scale = scale)/pweibull(t, shape = shape, #> scale = scale, lower.tail = F) #> <environment: 0x7fb6660a08d8> #>