agree_test: Tests for Absolute Agreement

View source: R/agree_test.R

agree_testR Documentation

Tests for Absolute Agreement

Description

[Superseded]

Development on agree_test() is complete, and for new code we recommend switching to agreement_limit(), which is easier to use, has more features, and still under active development.

The agree_test function calculates a variety of agreement statistics. The hypothesis test of agreement is calculated by the method described by Shieh (2019). Bland-Altman limits of agreement, and confidence intervals, are also provided (Bland & Altman 1999; Bland & Altman 1986). In addition, the concordance correlation coefficient (CCC; Lin 1989) is additional part of the output.

Usage

agree_test(
  x,
  y,
  delta,
  conf.level = 0.95,
  agree.level = 0.95,
  TOST = TRUE,
  prop_bias = FALSE
)

Arguments

x

Vector with first measurement

y

Vector with second measurement

delta

The threshold below which methods agree/can be considered equivalent, can be in any units. Often referred to as the "Equivalence Bound for Agreement" or "Maximal Allowable Difference".

conf.level

the confidence level required. Default is 95%.

agree.level

the agreement level required. Default is 95%. The proportion of data that should lie between the thresholds, for 95% limits of agreement this should be 0.95.

TOST

Logical indicator (TRUE/FALSE) of whether to use two one-tailed tests for the limits of agreement. Default is TRUE.

prop_bias

Logical indicator (TRUE/FALSE) of whether proportional bias should be considered for the limits of agreement calculations.

Value

Returns single list with the results of the agreement analysis.

  • shieh_test: The TOST hypothesis test as described by Shieh.

  • ccc.xy: Lin's concordance correlation coefficient and confidence intervals.

  • s.shift: Scale shift from x to y.

  • l.shift: Location shift from x to y.

  • bias: a bias correction factor that measures how far the best-fit line deviates from a line at 45 degrees. No deviation from the 45 degree line occurs when bias = 1. See Lin 1989, page 258.

  • loa: Data frame containing the limits of agreement calculations

  • h0_test: Decision from hypothesis test.

  • call: the matched call

References

Shieh (2019). Assessing Agreement Between Two Methods of Quantitative Measurements: Exact Test Procedure and Sample Size Calculation, Statistics in Biopharmaceutical Research, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1080/19466315.2019.1677495")}

Bland, J. M., & Altman, D. G. (1999). Measuring agreement in method comparison studies. Statistical methods in medical research, 8(2), 135-160.

Bland, J. M., & Altman, D. (1986). Statistical methods for assessing agreement between two methods of clinical measurement. The lancet, 327(8476), 307-310.

Lawrence, I., & Lin, K. (1989). A concordance correlation coefficient to evaluate reproducibility. Biometrics, 255-268.

Examples

data('reps')
agree_test(x=reps$x, y=reps$y, delta = 2)


arcaldwell49/SimplyAgree documentation built on Oct. 26, 2024, 4:15 p.m.