fmt_equivalence | R Documentation |
This function implements the suggestions of Astier & Wolak for the number of decimal digits to keep for coefficient estimates. The other statistics are rounded by fmt_significant()
.
fmt_equivalence(conf_level = 0.95, digits = 3, pdigits = NULL, ...)
conf_level |
Confidence level to use for the equivalence test (1 - alpha). |
digits |
Number of significant digits to keep. |
pdigits |
Number of decimal digits to keep for p values. If |
... |
Additional arguments are passed to the |
Astier, Nicolas, and Frank A. Wolak. Credible Numbers: A Procedure for Reporting Statistical Precision in Parameter Estimates. No. w32124. National Bureau of Economic Research, 2024.
library(modelsummary)
mod <- lm(mpg ~ hp, mtcars)
# Default equivalence-based formatting
modelsummary(mod, fmt = fmt_equivalence())
# alpha = 0.2
modelsummary(mod, fmt = fmt_equivalence(conf_level = .8))
# default equivalence, but with alternative significant digits for other statistics
modelsummary(mod, fmt = fmt_equivalence(digits = 5))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.