View source: R/hypothesis_helper.R
specify_hypothesis | R Documentation |
hypothesis
argumentWarning: This function is experimental. It may be renamed, the user interface may change, or the functionality may migrate to arguments in other marginaleffects
functions.
This function creates aggregation and test functions for use with the hypothesis
argument in marginaleffects
functions like predictions()
, slopes()
, and comparisons()
. The benefit of this function is that it handles a lot of the "boilerplate" code such as label creation and transformations by subgroups.
specify_hypothesis(
hypothesis = "reference",
label = NULL,
label_columns = NULL,
by = c("term", "group", "contrast")
)
hypothesis |
String or Function. Compute a test statistic.
|
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 |
by |
Character vector. Variable names which indicate subgroups in which the |
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.