match_subjects: Helper Function for the MatchIt Command

Description Usage Arguments Details Value References Examples

Description

A helper function that simplifies the steps and commands needed to find a subset of individuals from a test and control group that match over a collection of covariates when using the matchit function from the MatchIt.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
match_subjects(df, DV, ID = NULL)

is.match_subjects(x)

## S3 method for class 'match_subjects'
subset(x)

## S3 method for class 'match_subjects'
print(x)

## S3 method for class 'match_subjects'
summary(x)

## S3 method for class 'summary.match_subjects'
print(x, full = F)

Arguments

df

A data frame with a column denoting group membership (coded as 1 for the test group and 0 otherwise), columns for all covariates to match over, and an optional column with the identifier for each individual in the dataset.

DV

A character string with the column name for the binary variable denoting group membership.

ID

An optional character string giving the column name with the identifier for each individual. If NULL, default identifiers will be assigned to all individuals, saved in the column ID.

Details

Forthcoming.

Value

Forthcoming.

References

Daniel E. Ho, Kosuke Imai, Gary King, Elizabeth A. Stuart (2011). MatchIt: Nonparametric Preprocessing for Parametric Causal Inference. Journal of Statistical Software, Vol. 42, No. 8, pp. 1-28. URL http://www.jstatsoft.org/v42/i08/

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Example dataset from 'MatchIt' package
data( 'lalonde', package = 'MatchIt' )

# Extract data of interest
df = lalonde[,c('treat','age','educ','black','hispan','married','nodegree')]
mo = match_subjects( df, DV = 'treat' )
mo # Brief summary of matching
# Extract subset of data that was matched
md = subset( mo )
# Summary of results with tests for comparison of groups
sm = summary( mo )

rettopnivek/guiMatchIt documentation built on May 17, 2019, 10:39 a.m.