sim_dat_one_trial_exp_covar {BPrinStratTTE} | R Documentation |
Simulate data from a single two-arm trial with an exponentially distributed time-to-event endpoint and one predictor of the intercurrent event
Description
Simulate data from a single two-arm trial with an exponentially distributed time-to-event endpoint and one predictor of the intercurrent event
Usage
sim_dat_one_trial_exp_covar(
n,
nt,
prob_X1,
prob_ice_X1,
prob_ice_X0,
fu_max,
prop_cens = 0,
T0T_rate,
T0N_rate,
T1T_rate,
T1N_rate
)
Arguments
n |
Positive integer value, number of subjects in the trial. |
nt |
Positive integer value, number of treated subjects. |
prob_X1 |
Numeric value on the interval |
prob_ice_X1 |
Numeric value on the interval |
prob_ice_X0 |
Numeric value on the interval |
fu_max |
Positive integer value, maximum follow-up time in days (administrative censoring assumed afterwards). |
prop_cens |
Numeric value on the interval |
T0T_rate |
Positive numeric value, monthly event rate in control subjects that would develop the intercurrent event if treated. |
T0N_rate |
Positive numeric value, monthly event rate in control subjects that never develop the intercurrent event. |
T1T_rate |
Positive numeric value, monthly event rate in treated subjects that develop the intercurrent event. |
T1N_rate |
Positive numeric value, monthly event rate in treated subjects that never develop the intercurrent event. |
Value
...
See Also
sim_dat_one_trial_exp_nocovar()
Examples
d_params_covar <- list(
n = 1000,
nt = 500,
prob_X1 = 0.4,
prob_ice_X1 = 0.5,
prob_ice_X0 = 0.2,
fu_max = 48*7,
prop_cens = 0.15,
T0T_rate = 0.2,
T0N_rate = 0.2,
T1T_rate = 0.15,
T1N_rate = 0.1
)
dat_single_trial <- sim_dat_one_trial_exp_covar(
n = d_params_covar[["n"]],
nt = d_params_covar[["nt"]],
prob_X1 = d_params_covar[["prob_X1"]],
prob_ice_X1 = d_params_covar[["prob_ice_X1"]],
prob_ice_X0 = d_params_covar[["prob_ice_X0"]],
fu_max = d_params_covar[["fu_max"]],
prop_cens = d_params_covar[["prop_cens"]],
T0T_rate = d_params_covar[["T0T_rate"]],
T0N_rate = d_params_covar[["T0N_rate"]],
T1T_rate = d_params_covar[["T1T_rate"]],
T1N_rate = d_params_covar[["T1N_rate"]]
)
dim(dat_single_trial)
head(dat_single_trial)