diff --git a/R/format_stats_merMod.R b/R/format_stats_merMod.R index 30aa412..cf443d0 100644 --- a/R/format_stats_merMod.R +++ b/R/format_stats_merMod.R @@ -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") diff --git a/man/format_stats.merMod.Rd b/man/format_stats.merMod.Rd index 4a2b9e8..2b4b8fa 100644 --- a/man/format_stats.merMod.Rd +++ b/man/format_stats.merMod.Rd @@ -56,9 +56,8 @@ control over numbers of digits, leading zeros, italics, and output format of Markdown or LaTeX. } \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") @@ -85,6 +84,7 @@ Other functions for printing statistical objects: \code{\link{format_stats.easycorrelation}()}, \code{\link{format_stats.htest}()}, \code{\link{format_stats.lm}()}, +\code{\link{format_stats.lmerModLmerTest}()}, \code{\link{format_ttest}()} } \concept{functions for printing statistical objects} diff --git a/tests/testthat/test-format_stats_merMod.R b/tests/testthat/test-format_stats_merMod.R index 3c514d2..0af1ea9 100644 --- a/tests/testthat/test-format_stats_merMod.R +++ b/tests/testthat/test-format_stats_merMod.R @@ -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") })