CorrelatedPatientSample {escalation} | R Documentation |
A sample of patients that experience correlated events in simulations.
Description
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.
Super class
escalation::PatientSample
-> CorrelatedPatientSample
Public fields
num_patients
('integer(1)')
mu
('numeric(2)')
sigma
('matrix(2, 2)')
Methods
Public methods
Inherited methods
Method new()
Creator.
Usage
CorrelatedPatientSample$new( num_patients = 0, time_to_tox_func = function() runif(n = 1), time_to_eff_func = function() runif(n = 1), rho = 0 )
Arguments
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.
Returns
[CorrelatedPatientSample].
Method expand_to()
Expand sample to size at least num_patients
Usage
CorrelatedPatientSample$expand_to(num_patients)
Arguments
num_patients
('integer(1)').
Method clone()
The objects of this class are cloneable with this method.
Usage
CorrelatedPatientSample$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.
References
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