several: Runs several time the function donor_recipient_pairs() for as...

View source: R/mult.R

severalR Documentation

Runs several time the function donor_recipient_pairs() for as bootstrap.

Description

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 poll of donors. For uk algorithm must have 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, pt, uk (without quotation)

n

A positive integer to slice the first candidates.

seed.number

Seed for new random number. seed.number can be NA in which case no seed is applied.

check.validity

Logical to decide whether to validate input.

...

all the parameters used on the function algorithm

Value

Statistics related to all the times the function ran.

Examples

several(iteration.number = 10,
df.donors = donors,
df.candidates = candidates,
df.abs = cabs,
algorithm = lima,
n = 0,
seed.number = 123,
check.validity = TRUE)

FilipePintoReis/KARS_project documentation built on July 11, 2022, 9:19 a.m.