Extracts the calcated matches for indexing

extract_matches(
  matches,
  i_name = names(matches)[[1]],
  y_name = names(matches[[i_name]])[[1]],
  t_name = character(0),
  c_name = character(0)
)

Arguments

matches

An object created by calculate_matches(). Such an object has class "match_list".

i_name

The name of the indvidual for which matches are wanted. If unspecified, it takes the first individual.

y_name

The name of the outcome variable. If unspecified, it takes the first outcome.

t_name

A character vector containing the name of the treatment variables.

c_name

The name of the category level within the treatment variable.

Value

The row numbers in data corresponding to the matched children. The length of the list will be always equal to m if replace == TRUE, but may be shorter if replace == FALSE if the donors are exhausted. The length is zero if no matches can be found.

References

van Buuren, S. (2014). Curve matching: A data-driven technique to improve individual prediction of childhood growth. Annals of Nutrition & Metabolism, 65(3), 227-233. van Buuren, S. (2012). Flexible imputation of missing data. Boca Raton, FL: Chapman & Hall/CRC.

Author

Stef van Buuren 2016