specify_hypothesis: (EXPERIMENTAL) This experimental function will soon be...

View source: R/hypothesis_helper.R

specify_hypothesisR Documentation

(EXPERIMENTAL) This experimental function will soon be deprecated. Please supply a formula or function to the hypothesis argument to conduct (group-wise) hypothesis tests.

Description

(EXPERIMENTAL) This experimental function will soon be deprecated. Please supply a formula or function to the hypothesis argument to conduct (group-wise) hypothesis tests.

Usage

specify_hypothesis(
  hypothesis = "reference",
  comparison = "difference",
  label = NULL,
  label_columns = NULL,
  by = c("term", "group", "contrast"),
  internal = FALSE
)

Arguments

hypothesis

String or Function. Compute a test statistic.

  • String: "reference" or "sequential"

  • Function: Accepts a single argument named estimate and returns a numeric vector.

comparison

String. "ratio" or "difference"

label

Function. Accepts a vector of row labels and combines them to create hypothesis labels.

label_columns

Character vector. Column names to use for hypothesis labels. Default is c("group", "term", "rowid", attr(x, "variables_datagrid"), attr(x, "by")).

by

Character vector. Variable names which indicate subgroups in which the hypothesis function should be applied.

internal

Logical. Raises a deprecation warning when FALSE.

Value

specify_hypothesis() is a "function factory", which means that executing it will return a function suitable for use in the hypothesis argument of a marginaleffects function.


marginaleffects documentation built on Oct. 5, 2024, 5:06 p.m.