diff --git a/R/ard_emmeans_mean_difference.R b/R/ard_emmeans_mean_difference.R index b4e2fa5e9..86af2a44b 100644 --- a/R/ard_emmeans_mean_difference.R +++ b/R/ard_emmeans_mean_difference.R @@ -18,7 +18,7 @@ #' @inheritParams construct_model #' @param response_type (`string`) #' string indicating whether the model outcome is `'continuous'` -#' or `'binary'`. When `'binary'`, the call to `emmeans::emmeans()` is +#' or `'dichotomous'`. When `'dichotomous'`, the call to `emmeans::emmeans()` is #' supplemented with argument `regrid="response"`. #' @param conf.level (scalar `numeric`)\cr #' confidence level for confidence interval. Default is `0.95`. @@ -41,12 +41,12 @@ #' formula = vs ~ am + mpg, #' method = "glm", #' method.args = list(family = binomial), -#' response_type = "binary" +#' response_type = "dichotomous" #' ) ard_emmeans_mean_difference <- function(data, formula, method, method.args = list(), package = "base", - response_type = c("continuous", "binary"), + response_type = c("continuous", "dichotomous"), conf.level = 0.95, primary_covariate = stats::terms(formula) |> @@ -77,7 +77,7 @@ ard_emmeans_mean_difference <- function(data, formula, method, # emmeans -------------------------------------------------------------------- emmeans_args <- list(object = mod, specs = reformulate2(primary_covariate)) - if (response_type %in% "binary") emmeans_args <- c(emmeans_args, list(regrid = "response")) + if (response_type %in% "dichotomous") emmeans_args <- c(emmeans_args, list(regrid = "response")) emmeans <- withr::with_namespace( package = "emmeans", diff --git a/man/ard_emmeans_mean_difference.Rd b/man/ard_emmeans_mean_difference.Rd index 2a7c9ffa9..97466d7d6 100644 --- a/man/ard_emmeans_mean_difference.Rd +++ b/man/ard_emmeans_mean_difference.Rd @@ -10,7 +10,7 @@ ard_emmeans_mean_difference( method, method.args = list(), package = "base", - response_type = c("continuous", "binary"), + response_type = c("continuous", "dichotomous"), conf.level = 0.95, primary_covariate = getElement(attr(stats::terms(formula), "term.labels"), 1L) ) @@ -36,7 +36,7 @@ specified in \code{method} is executed.} \item{response_type}{(\code{string}) string indicating whether the model outcome is \code{'continuous'} -or \code{'binary'}. When \code{'binary'}, the call to \code{emmeans::emmeans()} is +or \code{'dichotomous'}. When \code{'dichotomous'}, the call to \code{emmeans::emmeans()} is supplemented with argument \code{regrid="response"}.} \item{conf.level}{(scalar \code{numeric})\cr @@ -74,7 +74,7 @@ ard_emmeans_mean_difference( formula = vs ~ am + mpg, method = "glm", method.args = list(family = binomial), - response_type = "binary" + response_type = "dichotomous" ) \dontshow{\}) # examplesIf} } diff --git a/tests/testthat/test-ard_emmeans_mean_difference.R b/tests/testthat/test-ard_emmeans_mean_difference.R index bb25c6785..c140c5b8b 100644 --- a/tests/testthat/test-ard_emmeans_mean_difference.R +++ b/tests/testthat/test-ard_emmeans_mean_difference.R @@ -8,7 +8,7 @@ test_that("ard_emmeans_mean_difference() works", { formula = vs ~ am + mpg, method = "glm", method.args = list(family = binomial), - response_type = "binary" + response_type = "dichotomous" ), NA ) @@ -36,7 +36,7 @@ test_that("ard_emmeans_mean_difference() works", { method = "glmer", method.args = list(family = binomial), package = "lme4", - response_type = "binary" + response_type = "dichotomous" ), NA )