View source: R/PiecewiseConstantExponentialRNG.R
PiecewiseConstantExponentialRNG | R Documentation |
Implementation is based on this algorithm.
PiecewiseConstantExponentialRNG(n, risk, endpoint_name)
n |
number of random numbers |
risk |
a data frame of columns
|
endpoint_name |
name of endpoint |
# example code
# In this example, absolute risk in [0, 1) and [26, 52] are 0.0181 and
# 0.0027, respectively.
risk <- data.frame(
end_time = c(1, 4.33, 26.0, 52.0),
piecewise_risk = c(1, 1.01, 0.381, 0.150) * exp(-4.01)
)
PiecewiseConstantExponentialRNG(10, risk, 'PFS')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.