distance.euclid: Euclidean distance calculation.

Description Usage Arguments Value

View source: R/triangle.match.R

Description

This method uses a simple Euclidean distance calculation for determining the distances between two matches. That is, |ps1 - ps2|.

Usage

1
distance.euclid(x, grouping, id, groups, caliper, nmatch = Inf)

Arguments

x

vector of propensity scores.

grouping

vector or factor identifying group membership.

id

vector corresponding to unique identifer for each element in x and grouping.

groups

vector of length two indicating the unique groups to calculate the distance between. The first element will be the rows, the second columns.

caliper

a scaler indicating the caliper to use for matching within each step.

nmatch

number of smallest distances to retain.

Value

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.


jbryer/TriMatch documentation built on May 18, 2019, 7:01 p.m.