lima: Candidates' ordering according to Lima's algorithm 'USING...

View source: R/lima.R

limaR Documentation

Candidates' ordering according to Lima's algorithm 'USING data.table'

Description

Ordering of waitlisted candidates for a given donor and according to to Lima's algorithm.

Usage

lima(
  iso = TRUE,
  dABO = "O",
  dA = c("1", "2"),
  dB = c("15", "44"),
  dDR = c("1", "4"),
  donor.age = 60,
  df.abs = cabs,
  data = candidates,
  n = 2,
  q2 = 60,
  q3 = 100,
  cPRA1 = 50,
  cPRA2 = 85,
  check.validity = TRUE
)

Arguments

iso

A logical value for isogroupal compatibility.

dABO

A character value with ABO blood group (env$valid.blood.groups).

dA

donor's HLA-A typing.

dB

donor's HLA-B typing.

dDR

donor's HLA-DR typing.

donor.age

A numeric value with donor's age.

df.abs

A data frame with candidates' antibodies.

data

A data frame containing demographics and medical information for a group of waitlisted transplant candidates with color priority classification.

n

A positive integer to slice the first candidates.

q2

A numerical value for the median of candidates' waiting list (env$q.minimum - env$q.maximum).

q3

A numerical value for the third quartile of candidates' waiting list (env$q.minimum - env$q.maximum).

cPRA1

A numerical value (env$percentage.minimum - env$percentage.maximum) for the lower cPRA cutoff.

cPRA2

A numerical value (env$percentage.minimum - env$percentage.maximum) for the higher cPRA cutoff.

check.validity

Logical to decide whether to validate input.

Value

An ordered data frame with a column 'cp' (color priority), 'sp', 'hi' and 'mmHLA'.

Examples

lima(iso = TRUE, dABO = "O",
dA = c("1","2"), dB = c("15","44"), dDR = c("1","4"),
donor.age = 60, df.abs = cabs,
data = candidates, n = 2, check.validity = TRUE)

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