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(
data = NULL,
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 data to be displayed in this layer. There are three options:
If NULL, the default, the data is inherited from the plot
data as specified in the call to ggplot().
A data.frame, or other object, will override the plot
data. All objects will be fortified to produce a data frame. See
fortify() for which variables will be created.
A function will be called with a single argument,
the plot data. The return value must be a data.frame, and
will be used as the layer data. A function can be created
from a formula (e.g. ~ head(.x, 10)).
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