Simulate regression, classification or survival outcome based on feature matrix and effect vector
Arguments
- X
Prepared feature matrix (as tibble or matrix) with standardized and potentially log-transformed numeric variables and dummy-coded categorical variables. If interaction effects are desired, a corresponding column has to be present in
X(e.g.X$interaction_A_B = X$A*X$B). Needs to contain an id column named ".id".- beta
Named effect vector with the corresponding effects for the columns in
X. Only non-zero effects have to be specified- type
type of the simulated outcome: "regression", "classification" or "survival"
- ctrl_regr
list with the settings for regression outcome, simulated by a linear regression model
b0model intercept
sdstandard deviation of the model error term
- ctrl_class
list with settings for classification outcome (event vs. no event), simulated by a logistic regression model
prob_evevent probability
mult_betaenhancement factor for the beta coefficient to control signal-to-noise ratio
- ctrl_surv
list with settings for right-censored survival outcome, simulated by a proportional hazard model with time-constant baseline hazard
surv_meanmean survival time
cens_meanmean censoring time,
NULLfor no censoringcens_maxmax censoring time,
NULLfor no censoringmult_betaenhancement factor for the beta coefficient to control signal-to-noise ratio
intboolean, round the survival times to the next highest integer