Description Usage Arguments Value Examples
Performs general matching with exact and mahalanobis distnace.
1 | general_match(data, w, max_distance = 0, replacement = TRUE, type = "exact")
|
data |
a dataframe object containing the variables and values. |
w |
a character vector describing the treatment variable. |
max_distance |
the maximum distance between propensity scores to form a match. Default is 0, as this is the distance for exact score matching |
replacement |
logical; if FALSE then treated and control units are matched without replacement of control units (a control unit can only be matched once). |
type |
a string specifying which type of score matching to perform. Choices are 'exact', which is the default, and 'mahalanobis', which uses the Mahalanobis distance. If a different method is mentioned, then exact is performed by default. |
a dataframe with two columns, the first corresponding to indices for treated observations, and the second corresponding to indices for matched control observations.
1 2 | data(lalonde)
general_match(lalonde, w = "treat", max_distance = 10, type = 'mahalanobis')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.