MatchBalance | R Documentation |
Calculates balance statistics for matching.
MatchBalance(
df,
formu,
formu.Y,
exact.covs,
index.treated,
index.control,
tolerance = 0.25,
n.levels = 2,
...
)
df |
data frame with data to match. |
formu |
the formula used to estimate propensity scores using logistic regression. |
formu.Y |
(optional) the formula used to estimate a multiple regression model with covariates. Used to estimate covariate importance. |
exact.covs |
character vector of covariates to match exactly on. For quantitative variables with more than two unique values, matches will be made within quintiles. |
index.treated |
a vector of integers corresponding to the rows in |
index.control |
a vector of integers corresponding to the rows in |
tolerance |
the maximum standard deviation the difference between matches on a quantitative covariate can be to be considered matched. |
n.levels |
maximum number of unique values in a covariate to attempt to
match exactly. If the number of unique values is greater than |
... |
other parameters passed to |
An object of class MatchBalance
with the following elements:
Results from the logistic regression model for treatment.
Results from the multiple regression model for Y.
a named numeric vector containing the percent of observations with "perfect" match for each covariate.
a named numeric vector containing the percent of covariates with "perfect" match for each observation.
a data frame with covariate importance. Covariate importance is estimated using the sum of the absolute t-statistic from both glm calls for treatment and outcome.
vector containing observation row number from original data frame for treated observations.
vector containing observatino row number from original data frame for control observations.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.