Helper function computes the difference with specific type.
Usage
h_difference(x, y, type)
Value
a matrix contains the x and y measurement data and corresponding difference.
Arguments
x
(numeric) reference method.
y
(numeric) test method.
type
(integer) integer specifying a specific difference for Bland-Altman
(default is 3). Possible choices are:
1 - difference with X vs. Y-X (absolute differences).
2 - difference with X vs. (Y-X)/X (relative differences).
3 - difference with 0.5*(X+Y) vs. Y-X (absolute differences).
4 - difference with 0.5*(X+Y) vs. (Y-X)/X (relative differences).
5 - difference with 0.5*(X+Y) vs. (Y-X)/(0.5*(X+Y)) (relative differences).