define_hypothesis: Define a hypothesis (system)

View source: R/define_hypothesis.R

define_hypothesisR Documentation

Define a hypothesis (system)

Description

This function enables the definition of a hypothesis (system) for a subsequent evaluation study of multiple prediction models.

Usage

define_hypothesis(
  target,
  threshold,
  comparator,
  delta = 0,
  alternative = c("two.sided", "less", "greater"),
  alpha = 0.05
)

Arguments

target

either a character corresponding to a known target (e.g. "accuracy"), call define_hypothesis() for a list of known targets. Alternativly target may be a custom SEPM.target, see ?define_target.

threshold

a numeric threshold defining the null level of the performance or error measure specified by objective$target.

comparator

integer, specifying which of the candidate models is the comparator. Alternatively the model name of the comparator may be specified as a character string.

delta

numeric, added to the right hand side of the hypothesis, to allow, e.g. non-inferiority designs (delta < 0).

alternative

character, specifying the alternative hypothesis, must be either "two.sided" (default), "greater" or "less". May be abbreviated.

alpha

numeric, specifying the significance level (between 0 and 0.5)

Details

Only threshold or comparator can be specified, not both. If target$co.primary is TRUE, threshold needs to have length 2 where the first element is associated for the threshold in the positive class (sensitiviy) and the second element corresponds to the negative class threshold (specificity). If threshold is specified as \theta_0, the null hypothesis is given as H_m: \theta_m \le \theta_0 + \delta for all candidate models m (for alternative = "greater"). If comparator is specified, e.g. as 1, the null is given as H_m: \theta_m - \theta_1 \le \delta for m > 1, i.e. the number of hypotheses is the number of models minus one. Similarly for alternative = "less" or "two.sided".

Value

An SEPM.hypothesis, a list with all relevant attributes that defines the goal of the evaluation study.

Examples

tar <- define_target("accuracy")
tar
define_hypothesis(tar, threshold=0.8)

maxwestphal/SEPM documentation built on April 12, 2024, 12:09 a.m.