Learn R Programming

mcradds (version 1.1.1)

blandAltman: Calculate Statistics for Bland-Altman

Description

[Experimental]

Calculate the Bland-Altman related statistics with specific difference type, such as difference, limited of agreement and confidence interval. And the outlier detecting function and graphic function will get the difference result from this.

Usage

blandAltman(x, y, sid = NULL, type1 = 3, type2 = 5, conf.level = 0.95)

Value

A object with BAsummary class that contains the BlandAltman analysis.

  • data a data frame contains the raw data from the input.

  • stat a list contains the summary table (tab) of Bland-Altman analysis, vector (absolute_diff) of absolute difference and vector (relative_diff) of relative difference.

Arguments

x

(numeric)
reference method.

y

(numeric)
test method.

sid

(numeric or string) sample id.

type1

(integer)
specifying a specific difference for absolute difference, default is 3.

type2

(integer)
specifying a specific difference for relative difference, default is 5.

conf.level

(numeric)
significance level for two side, default is 0.95.

See Also

h_difference() to see the type details.

Examples

Run this code
data("platelet")
blandAltman(x = platelet$Comparative, y = platelet$Candidate)

# with sample id as input sid
blandAltman(x = platelet$Comparative, y = platelet$Candidate, sid = platelet$Sample)

# Specifiy the type for difference
blandAltman(x = platelet$Comparative, y = platelet$Candidate, type1 = 1, type2 = 4)

Run the code above in your browser using DataLab