View source: R/getDesignSurvivals.R
pwexpcuts | R Documentation |
Obtains the piecewise exponential distribution that approximates a survival distribution.
pwexpcuts(S, ...)
S |
The survival function of a univariate survival time. |
... |
Additional arguments to be passed to S. |
A list with three components:
piecewiseSurvivalTime
: A vector that specifies the starting
time of piecewise exponential survival time intervals.
Must start with 0, e.g., c(0, 6) breaks the time axis into 2 event
intervals: [0, 6) and [6, Inf).
lambda
: A vector of hazard rates for the event. One for
each analysis time interval.
loglik
: The sequence of the asymptotic limit of the
piecewise exponential log-likelihood for an increasing number
of change points.
Kaifeng Lu, kaifenglu@gmail.com
# Example 1: Piecewise exponential
pwexpcuts(ptpwexp, piecewiseSurvivalTime = c(0, 3.4, 5.5),
lambda = c(0.0168, 0.0833, 0.0431), lowerBound = 0,
lower.tail = FALSE)
# Example 2: Weibull
pwexpcuts(pweibull, shape = 1.37, scale = 1/0.818, lower.tail = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.