`agree_test.Rd`

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.

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

- 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.

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

Shieh (2019). Assessing Agreement Between Two Methods of Quantitative Measurements: Exact Test Procedure and Sample Size Calculation, Statistics in Biopharmaceutical Research, https://doi.org/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.

```
data('reps')
agree_test(x=reps$x, y=reps$y, delta = 2)
#> Warning: `agree_test()` was deprecated in SimplyAgree 0.2.0.
#> ℹ Please use `agreement_limit()` instead.
#> Limit of Agreement = 95%
#>
#> ###- Shieh Results -###
#> Exact 90% C.I. [-2.6418, 3.5184]
#> Hypothesis Test: don't reject h0
#>
#> ###- Bland-Altman Limits of Agreement (LoA) -###
#> Estimate Lower CI Upper CI CI Level
#> Bias 0.4383 -0.1669 1.044 0.95
#> Lower LoA -1.9470 -2.8162 -1.078 0.90
#> Upper LoA 2.8237 1.9545 3.693 0.90
#>
#> ###- Concordance Correlation Coefficient (CCC) -###
#> CCC: 0.4791, 95% C.I. [0.1276, 0.7237]
```