Usage
Match(Y, Tr, X, Z = X, V = rep(1, length(Y)), estimand = "ATT", M = 1,
BiasAdj = FALSE, exact = NULL, caliper = NULL,
Weight = 1, Weight.matrix = NULL, weights = rep(1, length(Y)),
Var.calc = 0, sample = FALSE, tolerance = 1e-05)
Arguments
Y
A vector containing the outcome of interest.
Missing values are not allowed.
Tr
A vector indicating the observations which are
in the treatment regime and those which are not. This can either be a
logical vector or a real vector where 0 denotes control and 1 denotes
treatment.
X
A matrix containing the variables we wish to match on.
This matrix may contain the actual observed covariates or the
propensity score or a combination of both.
Z
A matrix containing the covariates for which we wish to make
bias adjustments.
V
A matrix containing the covariates for which the variance
of the causal effect may vary. Also see the Var.calc
option,
which takes precedence.
estimand
A character string for the estimand. The default
estimand is "ATT", the sample average treatment effect for the
treated. "ATE" is the sample average treatment effect (for all), and
"ATC" is the sample average treatment effect for the controls
M
A scalar for the number of matches which should be
found (with replacement). The default is one-to-one matching.
BiasAdj
A logical scalar for whether regression adjustment
should be used. See the Z
matrix.
exact
A logical scalar or vector for whether exact matching
should be done. If a logical scalar is
provided, that logical value is applied to all covariates of
X
. If a logical vector is provided, a logical value should
be provided
caliper
A scalar or vector denoting the caliper(s) which
should be used when matching. A caliper is the distance which is
acceptable for any match. Observations which are outside of the
caliper are dropped. If a scalar caliper is provided, this cali
Weight
A scalar for the type of
weighting scheme the matching algorithm should use when weighting
each of the covariates in X
. The default value of
1 denotes that weights are equal to the inverse of the variances. 2
denotes the Maha
Weight.matrix
This matrix denotes the weights the matching
algorithm uses when weighting each of the covariates in
X
---see the Weight
option. This square matrix should
have as many columns as the number of columns of the X
weights
A vector the same length as Y
which
provides observations specific weights.
Var.calc
A scalar for the variance estimate
that should be used. By default Var.calc=0
which means that
homoscedasticity is assumed. For values of Var.calc > 0
,
robust variances are calculated using Var.calc
ma
sample
A logical flag for whether the population or sample
variance is returned.
tolerance
This is a scalar which is used to determine if distances
are different from zero. Values less than tolerance
are deemed to
be equal to zero.