Description Usage Arguments Value See Also Examples
View source: R/plot_smd_comparison.R
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.
1 |
smd_data |
a data frame derived from |
Return a list of relevant data, code, and plot
plot_ps_qq()
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.