A Supplementary Function Set to 'MatchIt'

This function set is supplementary to 'MatchIt'. Its functions conduct several computations that 'MatchIt' does not provide. It takes the 'MatchIt' result object and/or the original data to compute standardized mean differences (SMD) between groups before and after matching. It also calculates ratio of variances and ratio of residual variances. In addition, it draws SMD comparison plots and QQ plots of distance measure score to help diagnose the matching result.


MatchItEXT

MatchItEXT is a supplementary pacakge to MatchIt in R. Its functions generate diagnostics that are unavailable in MatchIt and help assess the matching result (e.g., propensity score matching).

Installation

You can install the released version of MatchItEXT from CRAN with:

install.packages("MatchItEXT")

And the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("zoudj/MatchItEXT")

Example

The code chunk below demonstrates the basic usage of MatchItEXT functions. For more details, please see the vignette.

library(MatchItEXT)
## Computing Standardized Mean Difference (SMD).
## m_near is the Nearest Matching result from matchit() in MatchIt package.
smd_near <- compute_smd(mi_obj = m_near, sd = "pooled")
smd_near

## Computing Standardized Mean Difference (SMD) of subclassification result.
## m_sub is the subclassification result from matchit() in MatchIt package.
smd_sub <- compute_sub_smd(mi_obj = m_sub, sd = "pooled")
smd_sub

## Drawing SMD comparison dot-and-line plot.
plot_smd_near <- plot_smd(smd_near)
plot_smd_near$plot

## Drawing QQ plot for group comparison on the distance measure.
m_near_qq <- plot_ps_qq(m_near)
m_near_qq$plot

## Computing variance ratio and residual variance ratio
m_near_var_ratio <- compute_var_ratio(m_near)
m_near_var_ratio

compute_res_var_ratio(original_data = lalonde, mi_obj = m_near, type_vec = 
                        c(0, 1, 1, 1, 2, 2), discard = FALSE)

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("MatchItEXT")

0.0.1 by Danjie Zou, 6 years ago


Browse source code at https://github.com/cran/MatchItEXT


Authors: Danjie Zou [aut, cre]


Documentation:   PDF Manual  


GPL (>= 2) license


Imports dplyr, ggplot2, ggpubr, Hmisc, MatchIt, MASS, sure, tibble, tidyr, methods, stats

Suggests knitr, qpdf, rmarkdown, spelling, testthat


See at CRAN