inst/tinytest/test-extract_estimates.R

# bad estimate name throws error
mod <- lm(am ~ drat, data = mtcars)
expect_error(modelsummary:::format_estimates(mod, estimate = "junk"))


# bad statistic name throws error
mod <- lm(am ~ drat, data = mtcars)
expect_error(
  modelsummary(mod, output = "dataframe", statistic = "junk")
)

expect_error(
  modelsummary(mod,
    statistic = "junk",
    output = "dataframe",
    statistic_override = vcov)
)
vincentarelbundock/gtsummary documentation built on Nov. 6, 2024, 11:07 p.m.