Find matches on all outcomes shown on the active chart
find_matches(
target,
con,
dnr,
ynames,
nmatch = 5L,
period,
user_model = 2L,
exact_sex = FALSE,
exact_ga = FALSE,
break_ties = TRUE
)
A list with elements "psn"
and "xyz"
, e.g. as produced by
bdsreader::read_bds()
A connection on which the donor data reside. The
default (NULL
) reads from donorloader
package.
A string with the name of the donor data
(currently available are smocc
, terneuzen
,
lollypop
, pops
, 0-2
, 2-4
and 4-18
). The default (NULL
)
sets the donor data according to period[2]
.
A vector with the names of the response variables
for which matches are sought, e.g. ynames = c("hdc", "hgt")
.
Integer. Number of matches needed. When
nmatch == 0L
no matches are sought.
A vector of length 2 with left and right ages
(decimal age). If length(period) == 0L
, then no curve
matching is done
Model number (1-4), indicating type of model the user wants. See details.
A logical indicating whether sex should be matched exactly
A logical indicating whether gestational age should be matched exactly
A logical indicating whether ties should broken
randomly. The default (TRUE
) breaks ties randomly.
List with components with names ynames
. Each
component is a vector of integers representing the id's of the
matches cases from donor
. Returns integer(0)
if no
matches are found.