View source: R/data_generators.R
| generate_survival_data | R Documentation |
Simulate survival outcome data
generate_survival_data(
n,
n_signal_parameters,
noise_parameters,
beta_signal,
baseline_hazard,
censoring_rate,
complexity = 1,
nonlinear_strength = NULL,
predictor_type = "continuous",
binary_prevalence = 0,
correlation = 0.3,
distribution = "normal",
intercept = 0
)
n |
Sample size. |
n_signal_parameters |
Number of signal predictors. These occupy the
first |
noise_parameters |
Number of noise predictors (zero coefficient). |
beta_signal |
Base effect size / overall scale of the signal. |
baseline_hazard |
Baseline hazard rate (exponential survival model). |
censoring_rate |
Administrative censoring proportion in (0, 1). |
complexity |
Integer 1-4 specifying the functional form of the linear predictor:
|
nonlinear_strength |
Fraction of signal variance carried by the
nonlinear component (C2/C3 only), in [0, 1). When |
predictor_type |
Type of predictors: |
binary_prevalence |
Scalar in (0, 1]. Bernoulli probability applied to
all predictors when |
correlation |
Scalar in |
distribution |
Distribution family for all continuous
predictors. Default = |
intercept |
Scalar intercept added to the linear predictor. Default = 0. |
A data frame with columns time, event (0 = censored,
1 = event), x1, x2, ...
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.