Learn R Programming

cobalt (version 4.4.1)

bal.tab.cem.match: Balance Statistics for cem Objects

Description

Generates balance statistics for cem.match objects from cem.

Usage

# S3 method for cem.match
bal.tab(x, 
        data,
        stats,
        int = FALSE,
        poly = 1,
        distance = NULL,
        addl = 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,
        ...)

Value

If clusters and imputations are not specified, an object of class "bal.tab" containing balance summaries for the cem.match object. See bal.tab() for details.

If imputations are specified, an object of class "bal.tab.imp" containing balance summaries for each imputation and a summary of balance across imputations. See bal.tab.imp for details.

If cem() is used with multi-category treatments, an object of class "bal.tab.multi" containing balance summaries for each pairwise treatment comparison. See bal.tab.multi 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.

Arguments

x

a cem.match or cem.match.list object; the output of a call to cem::cem().

data

a data frame containing variables named in other arguments. An argument to data is required. It must be the same data used in the call to cem() or a mids object from which the data supplied to datalist in the cem() call originated.

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

see bal.tab() for details.

See below for a special note on the s.d.denom argument.

The following argument has a special note when used with cem.match or cem.match.list objects:

s.d.denom

the default is "treated", where the treated group corresponds to the baseline.group in the call to cem().

Author

Noah Greifer

Details

bal.tab.cem.match() generates a list of balance summaries for the cem.match object given, and functions similarly to cem::imbalance().

See Also

bal.tab() for details of calculations.

Examples

Run this code
if (FALSE) { # requireNamespace("cem", quietly = TRUE)
library(cem); data("lalonde", package = "cobalt")

## Coarsened exact matching
cem.out <- cem("treat", data = lalonde, drop = "re78")

bal.tab(cem.out, data = lalonde, un = TRUE, 
        stats = c("m", "k"))
}

Run the code above in your browser using DataLab