simulate_data() simulates data from a mixture model.
simulate_data(
n = 4000,
mixture_components = 2,
k = 2,
percentage_censored = 0.4,
starting_seed = sample(1:2^28, 1)
)A list with two elements: data and real_values. The data element is a tibble with the simulated data. The real_values is a tibble with the real values of the parameters used to generate the data.
Number of observations desired.
Number of mixtures to include in the generation of the data.
number of covariates generated (the total of covariates will be intercept + (k - 1) covariates).
Percentage of censored observations (defined as decimal value between 0 and 1). This will generate a delta vector in which 1 is an event that ocurred and 0 is a censored observation.
Seed to start the random number generation.