this is the sdm1

dm_national_formula(
  recip_matrix = NULL,
  donor_matrix = NULL,
  allocation_score = NULL,
  HLA = NULL,
  graft_number = 1,
  parameter_a = 1,
  parameter_b = 1,
  parameter_c = 1,
  quality = TRUE,
  age = TRUE,
  state = TRUE,
  bloodgroup = TRUE,
  accept_prob = NULL,
  yearly_scale = rep(1, 100)
)

Arguments

recip_matrix

a data.frame with recipient features, this is the input recipient matrix

donor_matrix

a data.frame with donor features, this is the input donor matrix

allocation_score

a vector, this is the score for each pair

HLA

a matrix, this is the calculated HLA mismatching counts matrix

graft_number

a numerical value, this is the graft number

parameter_a

an interger hyperparameter to tune

parameter_b

an interger hyperparameter to tune

parameter_c

an interger hyperparameter to tune

quality

a boolean value, TRUE/FALSE, quality measure indicator

age

a boolean value, TRUE/FALSE, age indicator

state

a boolean value, TRUE/FALSE, state indicator

bloodgroup

a boolean value, TRUE/FALSE, blood group indicator

accept_prob

a numerical value between 0 and 1, which is a user defined minimum acceptence probability, then for different recipient, we randomly sample from this value to 1, the default value is NULL, which means we give an accept rate based on HLA matchability

yearly_scale

a vector representing yearly scale, this allows the user to define different accpetence rate for different years

Value

a data.frame with matched recipient

Examples

data("newdata", package = "simKAP") HLA_matrix <- hla_match(raw_recip_matrix_subset, raw_donor_matrix[1,]) selected <- dm_national_formula(raw_recip_matrix_subset,raw_donor_matrix[1,], allocation_score=allocation_national(raw_recip_matrix_subset,raw_donor_matrix[1,],HLA_matrix), HLA_matrix,1,1,1,1,TRUE,TRUE,TRUE,TRUE,accept_prob = NULL, yearly_scale=rep(1, 100));
#> Warning: no non-missing arguments to min; returning Inf