View source: R/broom_methods.R
| tidy.robmedfit | R Documentation |
Returns a tidy data frame of the mediation effect estimates (NDE, NIE, TE)
at the reference dose, with confidence intervals. Compatible with
broom::tidy() and the broader tidymodels ecosystem.
## S3 method for class 'robmedfit'
tidy(x, conf.int = TRUE, ...)
x |
A |
conf.int |
Logical. Include confidence interval columns? Default |
... |
Ignored. |
A data frame with columns term, estimate, conf.low,
conf.high, and ref_dose.
fit <- robustmediate(
treatment_formula = X ~ Z1 + Z2 + Z3,
mediator_formula = M ~ X + Z1 + Z2 + Z3,
outcome_formula = Y ~ X + M + Z1 + Z2 + Z3,
data = sim_mediation, R = 50
)
tidy(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.