| survival_curve | R Documentation |
Evaluates the simstudy Weibull curve of define_survival(),
S(t) = exp(-exp(formula) * t^(1 / shape) / scale), at n survival
probabilities spread evenly from 1 - 1 / n down to 1 / n, inverting it
for the matching times. The points are therefore equally spaced in survival
probability, not in time.
survival_curve(formula, shape, scale = 1, n = 100L, time_limits = NULL)
formula |
Intercept of the linear predictor on the log scale. A single
finite number. |
shape |
Positive Weibull shape in the simstudy parameterization, the exponent applied to the transformed time. A single positive number. |
scale |
Positive Weibull scale, dividing the cumulative hazard. A single
positive number, defaulting to |
n |
Number of curve points. A single whole number of at least 2,
defaulting to |
time_limits |
Optional inclusive time range, as an increasing
non-negative numeric vector of length 2, that the curve is restricted to.
Defaults to |
A base data.frame with one row per retained curve point, in
increasing time order, and columns time and survival.
curve <- survival_curve(formula = -8, shape = 0.3, n = 10)
head(curve)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.