Create matched triplets by minimizing the total distance between matched triplets within a specified caliper.
trimatch(tpsa, caliper = 0.25, nmatch = c(15), match.order, exact,
method = maximumTreat, ...)
the results from trips
a vector of length one or three indicating the caliper to use for matching within each step. This is expressed in standardized units such that .25 means that matches must be within .25 of one standard deviation to be kept, otherwise the match is dropped.
number of closest matches to retain before moving to next edge. This can
be Inf
in which case all matches within the caliper will be retained
through to the next step. For large datasets, evaluating all possible
matches within the caliper could be time consuming.
character vector of length three indicating the order in which the matching algorithm will processes. The default is to use start with the group the middle number of subjects, followed by the smallest, and then the largest.
a vector or data frame of representing covariates for exact matching. That is, matched triplets will first be matched exactly on these covariates before evaluating distances.
This is a function that specifies which matched triplets will be
retained. If NULL
, all matched triplets within the specified
caliper will be returned (equivalent to caliper matching in two group
matching). The default is maximumTreat
that
attempts include each treatment at least once.
Another option is OneToN
which mimicks the one-to-n
matching where treatments are matched to multiple control units.
other parameters passed to method
.
The trips
function will estimate the propensity scores
for three models. This method will then find the best matched triplets based
upon minimizing the summed differences between propensity scores across the
three models. That is, the algorithm works as follows:
The first subject from model 1 is selected.
The nmatch[1]
smallest distances are selected using propensity scores from
model 1.
For each of the matches identified, the subjects propensity score from model 2 is retrieved.
The nmatch[2]
smallest distances are selected using propensity score from
model 3.
For each of those matches identified, the subjects propensity score from model 2 is retrieved.
The distances is calculated from the first and last subjects propensity scores from model 2.
The three distances are summed.
The triplet with the smallest overall distance is selected and returned.
# NOT RUN {
data(turoing)
formu <- ~ Gender + Ethnicity + Military + ESL + EdMother + EdFather + Age +
Employment + Income + Transfer + GPA
tpsa <- trips(tutoring, tutoring$treat, formu)
tmatch <- trimatch(tpsa, status=FALSE)
# }
Run the code above in your browser using DataLab