library("causatr")
result <- contrast(fit, interventions = list(a1 = static(1), a0 = static(0)))
tidy(result)
tidy(result, which = "means")
tidy(result, conf.level = 0.99)Tidy a causatr result
Description
Returns a tidy data frame of intervention means and/or pairwise contrasts from a causatr_result object, compatible with the broom ecosystem.
Usage
## S3 method for class 'causatr_result'
tidy(
x,
which = c("contrasts", "means", "all"),
conf.int = TRUE,
conf.level = 0.95,
...
)
Arguments
x
|
A causatr_result object.
|
which
|
Character. What to tidy: “contrasts” (default), “means”, or “all” (both).
|
conf.int
|
Logical. Include confidence interval columns? Default TRUE.
|
conf.level
|
Numeric. Confidence level for intervals. Default 0.95.
|
…
|
Currently unused. |
Value
A data.frame with columns term, estimate, std.error, conf.low, conf.high, and type (either “mean” or “contrast”).
See Also
coef.causatr_result(), confint.causatr_result()