Skip to contents

Join two or more distributions together at the specified cut points.

Usage

join(dist1, cut1, dist2, ...)

Arguments

dist1

survival distribution to use from time 0 to cut

cut1

cut point between dist1 and dist2

dist2

survival distribution to use from cut

...

Additional cutpoints and distributions

Value

A surv_join object

Examples


dist1 <- define_survival(distribution = "exp", rate = 0.05)
dist2 <- define_survival(distribution = "gompertz", rate = .5, shape = 1)
dist3 <- define_survival(distribution = "exp", rate = 0.25)
join_dist <- join(dist1, 20, dist2)
join_dist2 <- join(dist1, 20, dist2, 50, dist3)