Create a survival_curves object for use in examples by generating survival probabilities from from exponential survival distributions.

example_survival_curves(
  n = 1000,
  rates = stats::runif(n, 0.2, 0.5),
  times = seq(0, 30, 1/12)
)

Arguments

n

The number of individuals to create survival curves for.

rates

Rate parameter for each individual. Must be a numeric vector of length n.

times

A vector of times at which to compute survival probabilities.

See also

See survival_curves() for information about the survival_curves class.