general_match: Performs general matching with exact and mahalanobis...

Description Usage Arguments Value Examples

View source: R/propensity.R

Description

Performs general matching with exact and mahalanobis distnace.

Usage

1
general_match(data, w, max_distance = 0, replacement = TRUE, type = "exact")

Arguments

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.

Value

a dataframe with two columns, the first corresponding to indices for treated observations, and the second corresponding to indices for matched control observations.

Examples

1
2
data(lalonde)
general_match(lalonde, w = "treat", max_distance = 10, type = 'mahalanobis')

jackcollison/causality documentation built on Dec. 20, 2021, 8:05 p.m.