Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentarelbundock committed Aug 11, 2024
1 parent 9e5b572 commit 701fa8f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion R/fmt_factory.R
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ fmt_nainf <- function(x) {
#' 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()`.
#' @param conf_level Confidence level to use for the equivalence test (1 - alpha).
#' @inheritParams fmt_significant
#' @inheritParams fmt_decimal
#' @references
#' 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.
#'
Expand Down Expand Up @@ -360,7 +361,7 @@ fmt_equivalence <- function(conf_level = 0.95, digits = 3, pdigits = NULL, ...)
x_out <- fun_sig(x)

# Rank of last reported digit (first non-significant digit)
x$fnsd <- ceiling((log(x$std.error) + log(qnorm(p = (1 - alpha)))) / log(10)) - 1
x$fnsd <- ceiling((log(x$std.error) + log(stats::qnorm(p = (1 - alpha)))) / log(10)) - 1

# 1/ Format estimates (code provided by Nicolas Astier)
estimate_string <- as.character(x$estimate)
Expand Down
2 changes: 1 addition & 1 deletion man/escape_string.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions man/fmt_equivalence.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 701fa8f

Please sign in to comment.