geom_love()
and love_plot()
are helper functions to create Love plots in
ggplot2. Love plots are a diagnostic approach to assessing balance before and
after weighting. Many researchers use 0.1 on the absolute SMD scale to
evaluate if a variable is well-balanced between groups, although this is just
a rule of thumb. geom_love()
is a simple wrapper around
ggplot2::geom_point()
, ggplot2::geom_line()
, and
ggplot2::geom_vline()
. It also adds default aesthetics via
ggplot2::aes()
. love_plot()
is a quick plotting function that further
wraps geom_love()
. For more complex Love plots, we recommend using ggplot2
directly.
geom_love(
linewidth = 0.8,
line_size = NULL,
point_size = 1.85,
vline_xintercept = 0.1,
vline_color = "grey70",
vlinewidth = 0.6,
vline_size = NULL
)
love_plot(
.df,
linewidth = 0.8,
line_size = NULL,
point_size = 1.85,
vline_xintercept = 0.1,
vline_color = "grey70",
vlinewidth = 0.6,
vline_size = NULL
)
The line size, passed to ggplot2::geom_line()
.
Deprecated. Please use linewidth
.
The point size, passed to ggplot2::geom_point()
.
The X intercept, passed to ggplot2::geom_vline()
.
The vertical line color, passed to
ggplot2::geom_vline()
.
The vertical line size, passed to
ggplot2::geom_vline()
.
Deprecated. Please use vlinewidth
.
a data frame produced by tidy_smd()
a list of geoms
or a ggplot