build.dist.struct {rcbalance} | R Documentation |
Build Distance Structure for Matching with Refined Balance
Description
This function computes rank-based Mahalanobis distances between treated and control units and returns an object suitable for use in the distance.structure argument of rcbalance.
Usage
build.dist.struct(z, X, exact = NULL, calip.option = "propensity",
calip.cov = NULL, caliper = 0.2, verbose = FALSE)
Arguments
z |
a vector of treatment and control indicators, 1 for treatment and 0 for control. |
X |
a data frame or a numeric or logical matrix containing covariate information for treated and control units. Its row count must be equal to the length of |
exact |
an optional vector of the same length as |
calip.option |
one of |
calip.cov |
see |
caliper |
gives the size of the caliper when the user specifies the |
verbose |
if |
Details
If X
is a data frame and contains any character variables they are converted to factors with a warning. If there are missing values in factor columns of X
, they are treated as a new factor level. If there are missing values in numeric or logical columns of X
, an indicator of missingness for that column is added to X
and the missing values are imputed with the column mean. This follows the recommendations of Rosenbaum (Design of Observational Studies section 9.4, 2010).
Value
A distance.structure object, the form of which is described in the documentation for the distance.structure
argument of rcbalance
. Treated and control indices are numbered 1:nt
and 1:nc
respectively based on the order in which they appear in the z
vector.
Author(s)
Samuel D. Pimentel