bal.tab.matchit: Balance Statistics for 'MatchIt' Objects

View source: R/bal.tab.R

bal.tab.matchitR Documentation

Balance Statistics for MatchIt Objects

Description

Generates balance statistics for matchit objects from MatchIt.

Usage

## S3 method for class 'matchit'
bal.tab(x, 
        stats,
        int = FALSE,
        poly = 1,
        distance = NULL,
        addl = NULL,
        data = NULL,
        continuous,
        binary,
        s.d.denom,
        thresholds = NULL,
        weights = NULL,
        cluster = NULL,
        imp = NULL,
        pairwise = TRUE,
        s.weights = NULL,
        abs = FALSE,
        subset = NULL,
        quick = TRUE,
        method,
        ...)

Arguments

x

a matchit object; the output of a call to \pkgfunMatchItmatchit.

stats, int, poly, addl, data, continuous, binary, thresholds, weights, cluster, imp, pairwise, abs, subset, quick, ...

see \funbal.tab for details.

See below for special notes on the distance, s.d.denom, and s.weights arguments.

method

a character vector containing the method of adjustment. Ignored unless subclassification was used in the original call to matchit(). If "weighting", the subclassification weights will be used and subclasses will be ignored. If "subclassification", balance will be assessed using the subclasses (see bal.tab.subclass for details). Abbreviations allowed.

The following arguments have special notes when used with matchit objects:

distance

the distance measure (e.g., propensity score) generated by matchit() is automatically included and named "distance".

s.d.denom

if not specified, bal.tab() will figure out which one is best based on the estimand of the matchit object: if ATT, "treated"; if ATC, "control", otherwise "pooled".

s.weights

if s.weights was supplied in the call to matchit(), they will automatically be included and do not need be specified again (though there is no harm if they are).

Details

bal.tab.matchit() generates a list of balance summaries for the matchit object given, and functions similarly to \pkgfunMatchItsummary.matchit. bal.tab() behaves differently depending on whether subclasses are used in conditioning or not. If they are used, bal.tab() creates balance statistics for each subclass and for the sample in aggregate; see bal.tab.subclass for more information.

Value

If subclassification is used and method is set to "subclassification", an object of class "bal.tab.subclass" containing balance summaries within and across subclasses. See bal.tab.subclass for details.

If matching is used and clusters are not specified, an object of class "bal.tab" containing balance summaries for the matchit object. See \funbal.tab for details.

If clusters are specified, an object of class "bal.tab.cluster" containing balance summaries within each cluster and a summary of balance across clusters. See bal.tab.cluster for details.

Author(s)

Noah Greifer

See Also

\fun

bal.tab for details of calculations.

Examples

library(MatchIt); data("lalonde", package = "cobalt")

## Nearest Neighbor matching
m.out1 <- matchit(treat ~ age + educ + race + 
                  married + nodegree + re74 + re75, 
                  data = lalonde, method = "nearest")
                  
bal.tab(m.out1, un = TRUE, m.threshold = .1, 
        v.threshold = 2)

## Subclassification
m.out2 <- matchit(treat ~ age + educ + race + 
                  married + nodegree + re74 + re75, 
                  data = lalonde, method = "subclass")
                  
bal.tab(m.out2, disp.subclass = TRUE)

cobalt documentation built on Nov. 4, 2022, 1:05 a.m.