diagnose {MatchIt}R Documentation

Diagnostics for matching procedure

Description

diagnose is a sub-function of matchit which calculates summary statistics for the matching, including the weight for each unit.

Usage

 diagnose <- diagnose(formula, match.matrix, pscore, in.sample, data, exact=FALSE,
                mahvars=NULL, subclass=0, psclass=NULL, nearest=TRUE, q.cut=NULL, counter=TRUE)

Arguments

formula (required). Takes the form of T ~ X1 + X2, where T is a binary treatment indicator and X1 and X2 are the pre-treatment covariates, and T, X1, and X2 are contained in the same data frame. The + symbol means "inclusion" not "addition." You may also include interaction terms in the form if I(X1*X2) or squared terms in the form of I(X1^2).
match.matrix (required). n1 by ratio data frame where the rows correspond to treated units and the columns store the names of the control units matched to each treated unit. NA indicates that treated unit was not matched. Generally created in nearest.
pscore (required). Vector of estimated propensity scores. Generally calculated in distance.
in.sample (required). Vector of length n showing whether each unit was eligible for matching due to common support restrictions with discard. Generally calculated in distance.
data (required). Data frame containing the variables called in the formula. The dataframe should not include variables with the names psclass, psweights, or pscore, as these are expressly reserved in the output dataframe for MatchIt.
exact "FALSE" (default)=no exact matching. "TRUE"=exact matching on all variables in formula. A vector of variable names (that are in data to indicate separate variables on which to exact match, in combination with matching on the propensity score.
mahvars Variables on which to perform Mahalanobis matching within each caliper (default=NULL). Should be entered as a vector of names of variables in data.
subclass Either a scaler specifying the number of subclasses (default=0) or a vector of probabilities to create quantiles based on sub.by.
psclass Subclass index in an ordinal scale from 1 to the number of subclasses. Unmatched units have subclass=0. Generally computed in subclassify.
nearest Whether to perform nearest-neighbor matching (default=TRUE).
q.cut Subclass cut points. Generally calculated in subclassify.
counter Whether to display counter indicating the progress of the matching (default=TRUE).

Details

This is a sub-function of matchit which calculates summary statistics for the matching procedure in matchit, calculating t-statistics for covariates as well as weights for each unit. This function is called directly by matchit and does not generally need to be called directly by users; these details are included for advanced users.

Value

psweights Vector of length n giving the weight assigned to each unit in the matching process. Each weight is proportional to the number of times that unit was matched.

Author(s)

Daniel Ho <deho@fas.harvard.edu>; Kosuke Imai <kimai@princeton.edu>; Gary King <king@harvard.edu>; Elizabeth Stuart<stuart@stat.harvard.edu>

See Also

Please use help.matchit to access the matchit reference manual. The complete document is available online at http://gking.harvard.edu/matchit.


[Package MatchIt version 1.0-1 Index]