R/sanity_multcomp.R

Defines functions sanity_multcomp

sanity_multcomp <- function(multcomp, hypothesis, joint) {
    # I don't know how to adjust p values for a different null in `multcomp::glht()`
    if (!isFALSE(multcomp) && isTRUE(checkmate::check_number(hypothesis))) {
        msg <- "The `multcomp` argument is not available when `hypothesis` is a number."
        stop(msg, call. = FALSE)
    }
    if (!isFALSE(multcomp) && !isFALSE(joint)) {
        msg <- "The `multcomp` argument cannot be used with the `joint` argument."
        stop_sprintf(msg)
    }
    return(invisible(NULL))
}

Try the marginaleffects package in your browser

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

marginaleffects documentation built on Sept. 13, 2025, 5:07 p.m.