s2pwe | R Documentation |
Converts a discrete set of points from an arbitrary survival distribution to a piecewise exponential approximation.
s2pwe(times, survival)
times |
Positive increasing times at which survival distribution is provided. |
survival |
Survival (1 - cumulative distribution function) at specified |
A tibble containing the duration and rate.
The contents of this section are shown in PDF user manual only.
# Example: arbitrary numbers
s2pwe(1:9, (9:1) / 10)
# Example: lognormal
s2pwe(c(1:6, 9), plnorm(c(1:6, 9), meanlog = 0, sdlog = 2, lower.tail = FALSE))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.