Plot diagnostics for a causatr fit

Description

Produces a Love plot showing covariate balance before and after adjustment. Uses cobalt::love.plot() if the cobalt package is available.

For IPW fits, the plot shows balance before and after weighting. For matching fits, it shows balance before and after matching. For g-computation fits, it shows unadjusted balance only.

Usage

## S3 method for class 'causatr_diag'
plot(x, stats = "m", abs = TRUE, thresholds = c(m = 0.1), ...)

Arguments

x A causatr_diag object returned by diagnose().
stats Character. Which balance statistic(s) to plot. Default “m” (standardised mean differences). See cobalt::love.plot() for options.
abs Logical. Whether to plot absolute values. Default TRUE.
thresholds Named numeric vector. Threshold lines to draw on the plot. Default c(m = 0.1).
Additional arguments passed to cobalt::love.plot().

Value

A ggplot object (invisibly).

See Also

diagnose(), print.causatr_diag()