paired_equivalence_test: Perform equivalence testing on paired samples

View source: R/paired_equivalence_generic.R

paired_equivalence_test.data.frameR Documentation

Perform equivalence testing on paired samples

Description

Perform equivalence testing on paired samples

Usage

## S3 method for class 'data.frame'
paired_equivalence_test(
  x,
  y,
  y_type = c("both", "criterion", "comparison"),
  alpha = 0.05,
  na.rm = TRUE,
  scale = c("relative", "absolute"),
  absolute_region_width = NULL,
  relative_region_width = NULL,
  ...
)

## Default S3 method:
paired_equivalence_test(
  x,
  y,
  y_type = c("both", "criterion", "comparison"),
  alpha = 0.05,
  na.rm = TRUE,
  scale = c("relative", "absolute"),
  absolute_region_width = NULL,
  relative_region_width = NULL,
  ...
)

paired_equivalence_test(
  x,
  y,
  y_type = c("both", "criterion", "comparison"),
  alpha = 0.05,
  na.rm = TRUE,
  scale = c("relative", "absolute"),
  absolute_region_width = NULL,
  relative_region_width = NULL,
  ...
)

Arguments

x

numeric vector representing the (possibly surrogate) sample

y

numeric vector representing the (possibly criterion) sample. Index paired with x

y_type

classification of y for the purpose of analysis. Can be "criterion", "comparison", or "both".

alpha

the alpha level for the test

na.rm

logical. Omit mean values for mean calculations?

scale

character specifying whether the test should occur on an absolute or relative scale. Must be one of "relative" (default) or "absolute".

absolute_region_width

the region width for use when scale = "absolute"

relative_region_width

the region width for use when scale = "relative"

...

further arguments passed to methods. Currently unused.

Value

a 'paired_equivalence' object summarizing the test input and results

Note

If a value is not specified for the region width that corresponds with scale, a default value will be assigned with a warning.

References

Dixon et al.

Examples

set.seed(1544)
x <- data.frame(
  var1 = rnorm(500, 15, 4),
  var2 = rnorm(500, 23, 7.3)
)
y <- rnorm(500, 17.4, 9)

test_result <- paired_equivalence_test(
  x, y, relative_region_width = 0.25
)

lapply(test_result, head)


PAutilities documentation built on Aug. 21, 2022, 9:05 a.m.