Plot a causatr result
Description
Produces a forest plot of intervention means or pairwise contrasts from a causatr_result object using the forrest package.
The plot adapts to the context:
-
Contrast type: reference line at 0 (difference) or 1 (ratio/OR); log scale for ratio and OR.
-
Outcome family: axis label uses "risk" (binomial) or "mean" (other).
-
Effect modification (
by): sections group subgroup-specific estimates. -
Fit type: title notes point vs longitudinal analysis.
Usage
## S3 method for class 'causatr_result'
plot(x, which = c("contrasts", "means"), ...)
Arguments
x
|
A causatr_result object.
|
which
|
Character. What to plot: “contrasts” (default) for pairwise comparisons, or “means” for intervention-specific marginal means.
|
…
|
Additional arguments passed to forrest::forrest() (e.g. title, stripe, dodge, cols, widths, theme).
|
Value
Invisibly returns x.
See Also
contrast(), print.causatr_result(), forrest::forrest()