Generic function that runs the matchability between all combinations of donors and candidates.
Runs an arbitrary number of times (iteration.number
) to provide statistics.
Usage
several(
iteration.number = 10,
df.donors = donors,
df.candidates = candidates,
df.abs = cabs,
algorithm = lima,
n = 0,
seed.number = 123,
check.validity = TRUE,
...
)
Arguments
- iteration.number
Number of times the matchability runs.
- df.donors
A data frame containing demographics and medical information for a pool of donors. For
uk
algorithm must have their respective columns.- df.candidates
A data frame containing demographics and medical information for a group of waitlisted transplant candidates. For
uk
algorithm must have respective columns.- df.abs
A data frame with candidates' antibodies.
- algorithm
The name of the function to use. Valid options are:
lima
,et
,pts
,uk
(without quotation)- n
A positive integer to slice the first candidates.
- seed.number
Seed for new random number.
seed.number
can beNA
in which case no seed is applied.- check.validity
Logical to decide whether to validate input.
- ...
all the parameters used on the function algorithm
Examples
# \donttest{
several(iteration.number = 10,
df.donors = donors,
df.candidates = candidates,
df.abs = cabs,
algorithm = lima,
n = 0,
seed.number = 123,
check.validity = TRUE)
#> # A tibble: 10 × 15
#> it data age_avg mmHLA_avg mmHLA0_n mmHLA1_n mmHLA2_n mmHLA3_n mmHLA4_n
#> <chr> <list> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 1 <tibble> 48.4 3.39 1 7 16 56 37
#> 2 2 <tibble> 48.1 3.34 0 6 26 51 32
#> 3 3 <tibble> 48.2 3.41 0 5 18 63 31
#> 4 4 <tibble> 48.2 3.4 0 3 19 61 35
#> 5 5 <tibble> 48.3 3.38 1 5 21 56 32
#> 6 6 <tibble> 48.8 3.27 1 5 26 57 29
#> 7 7 <tibble> 49.1 3.3 0 6 25 58 29
#> 8 8 <tibble> 48.4 3.34 0 4 22 65 28
#> 9 9 <tibble> 48.6 3.33 0 7 21 58 30
#> 10 10 <tibble> 48.3 3.36 0 6 20 58 36
#> # ℹ 6 more variables: mmHLA5_n <dbl>, mmHLA6_n <dbl>, dialysis_avg <dbl>,
#> # cPRA_avg <dbl>, HI_n <dbl>, SP_n <dbl>
# }