R/correlated_patient_sample.R
CorrelatedPatientSample.Rd
Class to house the latent random variables that govern toxicity and efficacy
events in patients. Instances of this class can be used in simulation-like
tasks to effectively use the same simulated individuals in different designs,
thus supporting reduced Monte Carlo error and more efficient comparison. This
class differs from PatientSample
in that the latent variables
that underlie efficacy and toxicity events, and therefore those events
themselves, are correlated, e.g. for positive association, a patient that
experiences toxicity has increased probability of experiencing efficacy too.
Correlated uniformly-distributed variables are obtained by inverting
bivariate normal variables. The extent to which the events are correlated is
controlled by rho, the correlation of the two normal variables.
Sweeting, M., Slade, D., Jackson, D., & Brock, K. (2024). Potential outcome simulation for efficient head-to-head comparison of adaptive dose-finding designs. arXiv preprint arXiv:2402.15460
escalation::PatientSample
-> CorrelatedPatientSample
num_patients
(`integer(1)`)
mu
(`numeric(2)`)
sigma
(`matrix(2, 2)`)
new()
Creator.
CorrelatedPatientSample$new(
num_patients = 0,
time_to_tox_func = function() runif(n = 1),
time_to_eff_func = function() runif(n = 1),
rho = 0
)
num_patients
(`integer(1)`) Number of patients.
time_to_tox_func
(`function`) function taking no args that returns a single time of toxicity, given that toxicity occurs.
time_to_eff_func
(`function`) function taking no args that returns a single time of efficacy, given that efficacy occurs.
rho
(`integer(1)`) correlation of toxicity and efficacy latent variables.