| simul_data {bonsaiforest} | R Documentation | 
Simulate Covariates and Progression Free Survival Data
Description
This combines the covariates simulation via simul_covariates() with 10
categorical covariates, and the PFS simulation via simul_pfs().
Usage
simul_data(n, add_interaction = FALSE, coefs, ...)
Arguments
| n | ( | 
| add_interaction | ( | 
| coefs | ( | 
| ... | additional parameters apart from the linear predictor values
needed for  | 
Details
Regression coefficients are for an AFT with over-parametrized dummy coding for arm-subgroup interactions.
Value
A combined data.frame with the id column, the design matrix and the
PFS outcomes.
Examples
set.seed(321)
simul_data(
  n = 100,
  coefs = c(arm1 = 1),
  sigma_aft = 1,
  recr_duration = 0.2,
  rate_cens = 2,
  n_events = 20
)
[Package bonsaiforest version 0.1.0 Index]