| Meth {MethComp} | R Documentation |
Creates a dataframe with columns meth, item, (repl) and
y.
Meth( meth,
item,
repl,
y,
...,
print = FALSE)
## S3 method for class 'Meth':
summary( object, ... )
## S3 method for class 'Meth':
plot( x, y = NULL,
col.LA = "blue",
cex.name = 2,
var.range,
diff.range,
var.names = FALSE,
... )
## S3 method for class 'Meth':
subset(x, ... )
## S3 method for class 'Meth':
transform(`_data`, ... )
meth |
Vector of methods, numeric, character of factor.
May also be a dataframe. If this has columns, meth,
item, (repl) and y, these are used. |
item |
Vector of items. If meth is a dataframe, item is
taken as the columns of the meth dataframe to use as vectors
of meth, item, (repl) and y. |
repl |
Vector of replicate numbers. |
y |
Vector of measurements. For the plot method the argument is
either a vector indices or names of methods to plot. |
print |
Logical: Should a summary result be printed? |
object |
A Meth object. |
x |
A Meth object. |
col.LA |
What color should be used for the limits of agreement. |
cex.name |
Character expansion factor for plotting method names |
var.range |
The range of the axes in the scatter plot and the x-axis in the Bland-Altman plot be? |
diff.range |
The range of yaxis in the Bland-Altman plot. Defaults to a range as the x-axis, but centered around 0. |
var.names |
If logical: should the individual panels be labelled with the variable names?. If character, then the values of the character will be used to label the methods. |
_data |
A Meth object. |
... |
Ignored by the Meth and the summary functions.
In the plot function, parameters passed on the panel
function plotting methods against each other, as well as those
plotting differences against means. |
In order to perform analyses of method comparisons it is convenient to have a
dataframe with classifying factors , meth, item, and possibly
repl and the response variable y. This function creates such a
dataframe, and gives it a class, Meth, for which there is a number of
methods: tab - tabulation, plot - plotting and a couple of
analysis methods (not fixed yet).
The Meth function returns a Meth object which is a
dataframe with columns meth, item, (repl) and y.
summary.Meth returns a table classified by method and no. of
replicate measurements, where two colums with the total number of items
and measuremnts on each method is at added.
Bendix Carstensen, bxc@steno.dk
data(fat) # Different ways of selecting columns and generating replicate numbers Sub1 <- Meth(fat,c(2,1,3,4),print=TRUE) Sub2 <- Meth(fat,c(2,1,NA,4),print=TRUE) Sub3 <- Meth(fat,c(2,1,4),print=TRUE) summary( Sub3 ) plot( Sub3 ) # More than two methods data( sbp ) plot( Meth( sbp ) ) # Creating non-unique replicate numbers per (meth,item) creates a warning: data( hba1c ) hb1 <- with( hba1c, Meth( dev, item, d.ana-d.samp, y, print=TRUE ) ) hb2 <- with( subset(hba1c,type=="Cap"), Meth( dev, item, d.ana-d.samp, y, print=TRUE ) ) summary( hb1 ) summary( hb2 )