plot_smd: Draw a dot-line plot that compares the SMD change before and...

Description Usage Arguments Value See Also Examples

View source: R/plot_smd_comparison.R

Description

This function accepts the data set from compute_smd() and draws a dot-line plot to compare the SMD change before and after matching. This function differs from plot(summary(data, standardize = T) in MatchIt package in the following aspects: (1) it uses the original SMD values, rather than the absolute SMD values; (2) overall SMD line is colored in blue; (3) increased SMD line is colored in brick red; (4) decreased SMD line is colored in gray. This function depends on ggplot2. If users are not satisfied with the plot, it can be revised with ggplot2. Relevant data and codes are stored in the returned list.

Usage

1
plot_smd(smd_data = NULL)

Arguments

smd_data

a data frame derived from compute_smd

Value

Return a list of relevant data, code, and plot

See Also

plot_ps_qq()

Examples

1
2
3
4
m_out <- MatchIt::matchit(treat ~ re74 + re75 + age + educ + hispan +
 black, data = MatchIt::lalonde, method = "nearest")
opt_smd <- compute_smd(m_out, sd = "treatment")
plot_smd_data <- plot_smd(opt_smd)

MatchItEXT documentation built on Oct. 28, 2020, 5:06 p.m.