This method uses a simple Euclidean distance calculation for determining the distances between two matches. That is, |ps1 - ps2|.
distance.euclid(x, grouping, id, groups, caliper, nmatch = Inf)
vector of propensity scores.
vector or factor identifying group membership.
vector corresponding to unique identifer for each element in
x
and grouping
.
vector of length two indicating the unique groups to calculate the distance between. The first element will be the rows, the second columns.
a scaler indicating the caliper to use for matching within each step.
number of smallest distances to retain.
a list of length equal to x
. Each element of the list is a
named numeric vector where the values correspond to the distance and the
name to the id
.