Learn R Programming

PAutilities (version 1.1.0)

paired_equivalence_test.data.frame: Perform equivalence testing on paired samples

Description

Perform equivalence testing on paired samples

Usage

# S3 method for 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,
  ...
)

# S3 method for default 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, ... )

Value

a `paired_equivalence` object summarizing the test input and results

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.

References

Dixon et al.

Examples

Run this code
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)

Run the code above in your browser using DataLab