batest {coat} | R Documentation |
Bland-Altman Test of Method Agreement
Description
Function to perform a Bland-Altman test of differences in method agreement. Additional functions are given for printing and plotting.
Usage
batest(formula, data, subset, na.action, weights, ...)
## S3 method for class 'batest'
print(x, digits = 2, type = c("test", "model", "both"), ...)
## S3 method for class 'batest'
plot(x, ...)
Arguments
formula |
symbolic description of the model used to perform the Bland-Altman test of type |
data , subset , na.action |
arguments controlling the formula processing
via |
weights |
optional numeric vector of weights (case/frequency weights, by default). |
... |
further control arguments, passed to |
x |
an object as returned by |
digits |
a numeric specifying the number of digits to display. |
type |
character string specifying whether |
Value
Object of class batest
with elements
test |
result of the Bland-Altman test. |
model |
tree model used to perform the Bland-Altman test. |
Methods (by generic)
-
print(batest)
: function to print the result of the Bland-Altman test. -
plot(batest)
: function to plot the result of the Bland-Altman test.
Examples
## package and data (reshaped to wide format)
library("coat")
data("VitCap", package = "MethComp")
VitCap_wide <- reshape(VitCap, v.names = "y", timevar = "instrument",
idvar = c("item", "user"), drop = "meth", direction = "wide")
## two-sample BA-test
testresult <- batest(y.St + y.Exp ~ user, data = VitCap_wide)
## display
testresult
print(testresult, digits = 1, type = "both")
plot(testresult)