View source: R/simulate_data.R
simulate_data | R Documentation |
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)
)
n |
Number of observations desired. |
mixture_components |
Number of mixtures to include in the generation of the data. |
k |
number of covariates generated (the total of covariates will be intercept + (k - 1) covariates). |
percentage_censored |
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. |
starting_seed |
Seed to start the random number generation. |
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.