Description Usage Arguments Details Value Author(s) References See Also Examples
Given values of percent sinks and cutpoint, this function will find the corresponding near-far match
1 2 |
dta |
The name of the data frame on which to do the matching |
covs |
A vector of the names of the covariates to make “near”, e.g., covs=c("age", "sex", "race") |
iv |
The name of the instrumental variable, e.g., iv="QOB" |
imp.var |
A list of (up to 5) named variables to prioritize in the “near” matching |
tol.var |
A list of (up to 5) tolerances attached to the prioritized variables where 0 is highest penalty for mismatch |
sinks |
Percentage of the data to match to sinks (and thus remove) if desired; default is 0 |
cutpoint |
Value below which individuals are too similar on iv; increase to make individuals more “far” in match |
Default settings yield a "near" match on only observed confounders in X; add IV, sinks, and cutpoint to get near-far match.
A two-column matrix of row indices of paired matches
Joseph Rigdon jrigdon@stanford.edu
Lu B, Greevy R, Xu X, Beck C (2011). Optimal nonbipartite matching and its statistical applications. The American Statistician, 65(1), 21-30.
1 2 3 |
Loading required package: nbpMatching
Notice:
Formerly the gendistance() function scaled the Mahalanobis distances into large
integers, as required by the nonbimatch() function. Starting in version 1.5.0,
gendistance() will return unscaled distances. This facilitates comparison to an
appropriate F distribution for multivariate normal data. Any required scaling
will happen invisibly within nonbimatch(). This notice will be removed in a
future version of nbpMatching.
encouraged.numbers discouraged.match
[1,] 2 30
[2,] 3 27
[3,] 4 10
[4,] 5 7
[5,] 6 11
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.