View source: R/solvePiecewiseConstantExponentialDistribution.R
| solvePiecewiseConstantExponentialDistribution | R Documentation |
This function computes the rate parameters lambda in each of the time
windows. lambda are natural parameters of piecewise exponential
distribution, but in practice, users may define the distribution by
specifying the survival probabilities at time points where event rates
change.
This function returns a data frame, which can be used as input of the
argument risk of the data generator PiecewiseConstantExponentialRNG.
solvePiecewiseConstantExponentialDistribution(surv_prob, times)
surv_prob |
numeric. A vector of survival probabilities at |
times |
numeric. A vector of time points where event rates change.
|
a data frame of two columns
end_timeEnd time for a constant event rate. The start time of the first time window is 0.
A constant event rate in the time window ending with
end_time on the same row.
solvePiecewiseConstantExponentialDistribution(
surv_prob = c(.9, .75, .64, .42, .28),
times = c(.4, 1.2, 4, 5.5, 9)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.