Learn R Programming

mcradds (version 1.1.1)

h_difference: Compute Difference for Bland-Altman

Description

[Experimental]

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

Examples

Run this code
h_difference(x = c(1.1, 1.2, 1.5), y = c(1.2, 1.3, 1.4), type = 5)

Run the code above in your browser using DataLab