| simulate_bd_data | R Documentation |
Generates synthetic survival data from the Beta-Danish distribution, with optional right-censoring.
simulate_bd_data(n, a, b, c, k, censor_rate = 0, seed = NULL)
n |
Integer; number of observations to simulate. |
a, b, c, k |
Numeric; parameters of the Beta-Danish distribution. |
censor_rate |
Numeric; rate parameter for the exponential censoring distribution. If '0' (default), no censoring is applied. |
seed |
Integer; optional seed for reproducibility. |
A data frame with columns 'time' and 'status'.
# Simulate complete data
dat <- simulate_bd_data(n = 100, a = 1.5, b = 2, c = 3, k = 0.5)
# Simulate censored data
dat_cens <- simulate_bd_data(n = 100, a = 1.5, b = 2, c = 3, k = 0.5, censor_rate = 0.1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.