interpret function

Generic Function for Interpretation

Generic Function for Interpretation

Interpret a value based on a set of rules. See rules().

interpret(x, ...) ## S3 method for class 'numeric' interpret(x, rules, name = attr(rules, "rule_name"), transform = NULL, ...) ## S3 method for class 'effectsize_table' interpret(x, rules, transform = NULL, ...)

Arguments

  • x: Vector of value break points (edges defining categories), or a data frame of class effectsize_table.
  • ...: Currently not used.
  • rules: Set of rules(). When x is a data frame, can be a name of an established set of rules.
  • name: Name of the set of rules (will be printed).
  • transform: a function (or name of a function) to apply to x before interpreting. See examples.

Returns

  • For numeric input: A character vector of interpretations.
  • For data frames: the x input with an additional Interpretation column.

Examples

rules_grid <- rules(c(0.01, 0.05), c("very significant", "significant", "not significant")) interpret(0.001, rules_grid) interpret(0.021, rules_grid) interpret(0.08, rules_grid) interpret(c(0.01, 0.005, 0.08), rules_grid) interpret(c(0.35, 0.15), c("small" = 0.2, "large" = 0.4), name = "Cohen's Rules") interpret(c(0.35, 0.15), rules(c(0.2, 0.4), c("small", "medium", "large"))) bigness <- rules(c(1, 10), c("small", "medium", "big")) interpret(abs(-5), bigness) interpret(-5, bigness, transform = abs) # ---------- d <- cohens_d(mpg ~ am, data = mtcars) interpret(d, rules = "cohen1988") d <- glass_delta(mpg ~ am, data = mtcars) interpret(d, rules = "gignac2016") interpret(d, rules = rules(1, c("tiny", "yeah okay"))) m <- lm(formula = wt ~ am * cyl, data = mtcars) eta2 <- eta_squared(m) interpret(eta2, rules = "field2013") X <- chisq.test(mtcars$am, mtcars$cyl == 8) interpret(oddsratio(X), rules = "cohen1988") interpret(cramers_v(X), rules = "lovakov2021")

See Also

rules()

  • Maintainer: Mattan S. Ben-Shachar
  • License: MIT + file LICENSE
  • Last published: 2024-12-10