rBin2Corr {crm12Comb} | R Documentation |
Generate correlated binary variables
Description
Generate correlated bivariate binary outcomes of toxicity and efficacy for a cohort number of patients.
Usage
rBin2Corr(cohortsize, pT, pE, psi, seed=NULL)
Arguments
cohortsize |
Number of patients in each cohort. |
pT |
Toxicity probability. |
pE |
Efficacy probability. |
psi |
Association parameter for efficacy and toxicity, where psi=0 means toxicity and efficacy is independent. |
seed |
An integer for the seed to generate random numbers, default is NULL. |
Details
The formula for generating correlated binary variables is
where , so that four probabilities can be calculated for the possible combinations of (toxicity, efficacy) including
given
and
. Multinomial distribution
rmultinom
is further used to generate bivariate binary outcomes (number equals to cohortsize) based on the four calculated probabilities.
Value
Return a matrix with columns corresponding to toxicity and efficacy, and rows for each observations of binary outcome with 0 for no toxicity (no efficacy) and 1 for toxicity (efficacy) at the first (second) column.
References
Murtaugh, P. A., & Fisher, L. D. (1990). Bivariate binary models of efficacy and toxicity in dose-ranging trials. Communications in Statistics-Theory and Methods, 19(6), 2003-2020. doi:10.1080/03610929008830305
Thall, P. F., & Cook, J. D. (2004). Dose‐finding based on efficacy–toxicity trade‐offs. Biometrics, 60(3), 684-693. doi:10.1111/j.0006-341X.2004.00218.x
Examples
rBin2Corr(cohortsize = 1, pT = 0.2, pE = 0.4, psi = 0, seed=12)