Skip to content

Commit

Permalink
Clean up format_stats.merMod test and documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffreyRStevens committed Dec 2, 2024
1 parent ec9abe3 commit b119227
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
5 changes: 2 additions & 3 deletions R/format_stats_merMod.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@
#' @export
#'
#' @examples
#' library(lme4)
#' test_lmer <- lmer(mpg ~ hp + (1 | cyl), data = mtcars)
#' test_glmer <- glmer(am ~ hp + (1 | cyl), data = mtcars, family = binomial)
#' test_lmer <- lme4::lmer(mpg ~ hp + (1 | cyl), data = mtcars)
#' test_glmer <- lme4::glmer(am ~ hp + (1 | cyl), data = mtcars, family = binomial)
#'
#' # Format linear mixed model term statistics
#' format_stats(test_lmer, term = "hp")
Expand Down
6 changes: 3 additions & 3 deletions man/format_stats.merMod.Rd

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

1 change: 0 additions & 1 deletion tests/testthat/test-format_stats_merMod.R
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,4 @@ test_that("formatting glm linear models works properly", {
expect_equal(format_stats(test_glmer, "a", full = FALSE), "_β_ = 0.051, _p_ = .822")
expect_equal(format_stats(test_glmer, "a", italics = FALSE), "β = 0.051, SE = 0.226, z = 0.224, p = .822")
expect_equal(format_stats(test_glmer, "a", type = "latex"), "$\\beta$ = 0.051, SE = 0.226, $z$ = 0.224, $p$ = .822")
expect_equal(format_stats(test_glmer, "a", type = "latex", dfs = "sub"), "$\\beta$ = 0.051, SE = 0.226, $z$ = 0.224, $p$ = .822")
})

0 comments on commit b119227

Please sign in to comment.