Simulate a multi-state dataset for a 3-state model with
sim_mstate3_date()
and compute progression-free survival (PFS)
and overall survival (OS).
sim_pfs_os_data(n = 2000, seed = NULL)
n | The number of patients to simulate. |
---|---|
seed | An integer to pass to |
Returns a data.table
with one rows for each patient.
The returned columns are as follows:
The patient ID.
The treatment strategy ID.
The name of the treatment strategy. Either "New
or "SOC
.
1
if female and 0
if male.
The age of the patient in years.
Time to progression, death, or right censoring.
1
if a progression or death event occured and 0
if there was right censoring.
Time to death or right censoring.
1
if a patient died and 0
if there was right censoring.
sim_pfs_os_data(n = 3, seed = 101)#> Error in sim_pfs_os_data(n = 3, seed = 101): could not find function "sim_pfs_os_data"