Obtains the simulated data for baseline prognosis, disease progression, treatment switching, death, and time-dependent covariates.
tsegestsim(
n = 500L,
allocation1 = 2L,
allocation2 = 1L,
pbprog = 0.5,
trtlghr = -0.5,
bprogsl = 0.3,
shape1 = 1.8,
scale1 = 2.5e-05,
shape2 = 1.7,
scale2 = 1.5e-05,
pmix = 0.5,
admin = 5000,
pcatnotrtbprog = 0.5,
pcattrtbprog = 0.25,
pcatnotrt = 0.2,
pcattrt = 0.1,
catmult = 0.5,
tdxo = 1,
ppoor = 0.1,
pgood = 0.04,
ppoormet = 0.4,
pgoodmet = 0.2,
xomult = 1.4188308,
milestone = 546,
swtrt_control_only = 1L,
outputRawDataset = 1L,
seed = NA_integer_
)
A list with two data frames.
sumdata
: A data frame with the following variables:
simtrueconstmean
: The true control group restricted mean
survival time (RMST).
simtrueconstlb
: The lower bound for control group RMST.
simtrueconstub
: The upper bound for control group RMST.
simtrueconstse
: The standard error for control group RMST.
simtrueexpstmean
: The true experimental group restricted
mean survival time (RMST).
simtrueexpstlb
: The lower bound for experimental group RMST.
simtrueexpstub
: The upper bound for experimental group RMST.
simtrueexpstse
: The standard error for experimental group
RMST.
simtrue_coxwbprog_hr
: The treatment hazard ratio from the
Cox model adjusting for baseline prognosis.
simtrue_cox_hr
: The treatment hazard ratio from the Cox
model without adjusting for baseline prognosis.
paneldata
: A counting process style data frame with the
following variables:
id
: The subject ID.
trtrand
: The randomized treatment arm.
bprog
: Whether the patient had poor baseline prognosis.
tstart
: The left end of time interval.
tstop
: The right end of time interval.
died
: Whether the patient died.
progressed
: Whether the patient had disease progression.
timePFSobs
: The observed time of disease progression at
regular scheduled visits.
progtdc
: The time-dependent covariate for progression.
catevent
: Whether the patient developed metastatic disease.
cattime
: When the patient developed metastatic disease.
cattdc
: The time-dependent covariate for cat event.
catlag
: The lagged value of cattdc
.
xo
: Whether the patient switched treatment.
xotime
: When the patient switched treatment.
xotdc
: The time-dependent covariate for treatment
switching.
xotime_upper
: The upper bound of treatment switching time.
censor_time
: The administrative censoring time.
The total sample size for two treatment arms combined.
The number of subjects in the active treatment group in a randomization block.
The number of subjects in the control group in a randomization block.
The probability of having poor prognosis at baseline.
The treatment effect in terms of log hazard ratio.
The poor prognosis effect in terms of log hazard ratio.
The shape parameter for the Weibull event distribution for the first component.
The scale parameter for the Weibull event distribution for the first component.
The shape parameter for the Weibull event distribution for the second component.
The scale parameter for the Weibull event distribution for the second component.
The mixing probability of the first component Weibull distribution.
The administrative censoring time.
The probability of developing metastatic disease on control treatment with poor baseline prognosis.
The probability of developing metastatic disease on active treatment with poor baseline prognosis.
The probability of developing metastatic disease on control treatment with good baseline prognosis.
The probability of developing metastatic disease on active treatment with good baseline prognosis.
The impact of metastatic disease on shortening remaining survival time.
Whether treatment crossover depends on time-dependent covariates between disease progression and treatment switching.
The probability of switching for poor baseline prognosis with no metastatic disease.
The probability of switching for good baseline prognosis with no metastatic disease.
The probability of switching for poor baseline prognosis after developing metastatic disease.
The probability of switching for good baseline prognosis after developing metastatic disease.
The direct effect of crossover on extending remaining survival time.
The milestone to calculate restricted mean survival time.
Whether treatment switching occurred only in the control group.
Whether to output the raw data set.
The seed to reproduce the simulation results. The seed from the environment will be used if left unspecified.
Kaifeng Lu, kaifenglu@gmail.com
sim1 <- tsegestsim(
n = 500, allocation1 = 2, allocation2 = 1, pbprog = 0.5,
trtlghr = -0.5, bprogsl = 0.3, shape1 = 1.8,
scale1 = 0.000025, shape2 = 1.7, scale2 = 0.000015,
pmix = 0.5, admin = 5000, pcatnotrtbprog = 0.5,
pcattrtbprog = 0.25, pcatnotrt = 0.2, pcattrt = 0.1,
catmult = 0.5, tdxo = 1, ppoor = 0.1, pgood = 0.04,
ppoormet = 0.4, pgoodmet = 0.2, xomult = 1.4188308,
milestone = 546, outputRawDataset = 1, seed = 2000)
Run the code above in your browser using DataLab