File: sanity_multcomp.R

package info (click to toggle)
r-cran-marginaleffects 0.32.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,784 kB
  • sloc: sh: 13; makefile: 8
file content (12 lines) | stat: -rw-r--r-- 543 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
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))
}