plot.MethComp plots the conversion function with prediction limits;
always using the original scale of measurements. It also sets the options
"MethComp.wh.cmp" indicating which two methods are plotted and
"MethComp.pl.type" indicating whether a plot of methods against each
other or a Bland-Altman type plot of differences versus averages. By default
the conversion lines are plotted.
# S3 method for MethComp
plot(
  x,
  wh.comp = 1:2,
  pl.type = "conv",
  dif.type = "lin",
  sd.type = "const",
  axlim = range(x$data$y, na.rm = TRUE),
  diflim = axlim - mean(axlim),
  points = FALSE,
  repl.conn = FALSE,
  col.conn = "gray",
  lwd.conn = 1,
  grid = TRUE,
  N.grid = 10,
  col.grid = grey(0.9),
  lwd = c(3, 1, 1),
  col.lines = "black",
  col.points = "black",
  pch.points = 16,
  eqn = is.null(attr(x, "Transform")),
  col.eqn = col.lines,
  font.eqn = 2,
  digits = 2,
  mult = FALSE,
  alpha = NULL,
  ...
)MethComp returns a MethComp object, which is a list
with three elements, Conv, a three-way array giving the linear
conversion equations between methods, VarComp, a two-way array
classified by methods and variance components and data, a copy of the
original Meth object supplied --- see the description under
BA.est.
A MethComp object has an attribute Transform, which is either
NULL, or a named list with elements trans and inv, both of
which are functions. The first is the transformation applied to measurements
before analysis; the results are all given on the transformed scale. The
second is the inverse transformation; this is only used when plotting the
resulting relationship between methods.
The methods print, plot, lines and points return
nothing.
A MethComp object.
Numeric or character of length 2. Which two methods should be plotted.
Character. If "conv" it will be a plot of two methods against each other, otherwise it will be a plot of the 1st minus the 2nd versus the average; a Bland-Altman type plot.
Character. If "lin" (the default) a linear relationship between methods is allowed. Otherwise a constant difference is assumed and LoA can be indicated on the plot.
Should the estimated dependence of the SD (from
DA.reg be used when plotting prediction limits?
The extent of the axes of the measurements.
The extent of the axis of the differences.
Logical. Should the points be included in the plot.
Logical. Should replcate measurements be connected; this assumes linked replicates.
Color of the lines connecting replicates.
Width of the connection lines.
Should there be a grid? If numerical, gridlines are drawn at these locations.
Numeric. How many gridlines? If a vector of length>1, it will be taken as the position of the gridlines.
Color of the gridlines.
Numerical vector of length 3. Width of the conversion line and the prediction limits.
Color of the conversion lines.
Color of the points.
Plot character for points.
Logical. Should the conversion equation be printed on the plot.
Color of the conversion formula
font for the conversion formula
The number of digits after the decimal point in the conversion formulae.
Logical. Should ratios be plotted on a log-scale instead of
differences on a linear scale? See description of the argument for
BA.plot.
1 minus the confidence level for the prediction interval. If not given, the prediction interval is constructed as plus/minus twice the SD.
Further arguments.
Bendix Carstensen, Steno Diabetes Center, bendix.carstensen@regionh.dk .
lines.MethComp and points.MethComp adds conversion lines with
prediction limits and points to a plot.
BA.est AltReg MCmcmc
data( ox )
BA.ox <- BA.est( ox, linked=TRUE )
print( BA.ox )
if (FALSE) {
AR.ox <- AltReg( ox, linked=TRUE  )
print( AR.ox )
plot( AR.ox ) }
Run the code above in your browser using DataLab