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)
)

Try the modelsummary package in your browser

Any scripts or data that you put into this service are public.

modelsummary documentation built on Oct. 15, 2023, 5:06 p.m.