candidates_df | R Documentation |
Returns a data frame for simulated donors clinical and demographic characteristics.
candidates_df(
n = 10,
replace = TRUE,
origin = "PT",
probs_abo = c(0.43, 0.03, 0.08, 0.46),
probs_cpra = c(0.7, 0.1, 0.1, 0.1),
lower = 18,
upper = 75,
mean = 45,
sd = 15,
prob_dm = 0.12,
uk = FALSE,
n_seed = 3
)
n |
An integer to define the number of rows |
replace |
A logical value for sampling with replacement |
origin |
A character value for population origin from options: 'PT', 'API', 'AFA', 'CAU' and 'HIS' |
probs_abo |
A vector with the probabilities for blood group A, AB, B and O (in this order). The sum of the probabilities must be equal to one. |
probs_cpra |
A vector with the probabilities for cPRA groups 0%, 1%-50%, 51%-84%, 85%-100% (in this order). The sum of the probabilities must be equal to one. |
lower |
An integer for ages' lower limit. |
upper |
An integer for ages' upper limit. |
mean |
A value for mean age's distribution. |
sd |
A value for standard deviation age's distribution. |
prob_dm |
A value for the probability of having Diabetes Mellitus |
uk |
A logical value, if TRUE is also computed the Donor Risk Index (DRI) |
n_seed |
a numeric seed that will be used for random number generation. |
A data frame with HLA typing, blood group, truncated ages, time on dialysis (in months), cPRA, Tier, MS and RRI (those last 3, only when uk = TRUE) for a simulated group of transplant candidates.
candidates_df(n = 10, replace = TRUE, origin = 'PT',
probs_abo = c(0.43, 0.03, 0.08, 0.46), probs_cpra = c(0.7, 0.1, 0.1, 0.1),
lower=18, upper=75, mean = 45, sd = 15,
prob_dm = 0.12,
uk = FALSE, n_seed = 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.