MethComp: Summarize conversion equations and prediction intervals...

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Takes the results from BA.est, DA.reg, AltReg or MCmcmc and returns a MethComp object, suitable for displaying the relationship between methods in print pr graphic form.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
MethComp(obj)
## S3 method for class 'MethComp'
print(x, digits=3, ... )
## S3 method for class '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,
       h.grid = TRUE,
     col.grid = grey(0.9),
          lwd = c(3,1,1),
    col.lines = "black",
   col.points = "black",
   pch.points = 16,
   cex.points = 1,
          eqn = is.null(attr(x,"Transform")),
      col.eqn = col.lines,
     font.eqn = 2,
       digits = 2,
         mult = FALSE,
        alpha = NULL,
          ... )
## S3 method for class 'MethComp'
lines(x,
                   wh.comp = getOption("MethComp.wh.comp"),
                   pl.type = getOption("MethComp.pl.type"),
                  dif.type = getOption("MethComp.dif.type"),
                   sd.type = getOption("MethComp.sd.type"),
                 col.lines = "black",
                       lwd = c(3,1,1),
                    digits = 3,
                      mult = FALSE,
                     alpha = NULL,
                       ... )
## S3 method for class 'MethComp'
points(x,
                    wh.comp = getOption("MethComp.wh.comp"),
                    pl.type = getOption("MethComp.pl.type"),
                 col.points = "black",
                 pch.points = 16,
                 cex.points = 1,
                  repl.conn = FALSE,
                   col.conn = "gray",
                   lwd.conn = 1,
                       mult = FALSE,
                        ... )

Arguments

obj

A MethComp or MCmcmc object.

x

A MethComp object.

wh.comp

Numeric or character of length 2. Which two methods should be plotted.

pl.type

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.

dif.type

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.

sd.type

Should the estimated dependence of the SD (from DA.reg be used when plotting prediction limits?

axlim

The extent of the axes of the measurements.

diflim

The extent of the axis of the differences.

points

Logical. Should the points be included in the plot.

repl.conn

Logical. Should replcate measurements be connected; this assumes linked replicates.

col.conn

Color of the lines connecting replicates.

lwd.conn

Width of the connection lines.

grid

Should there be a grid? If numeric, how many gridlines? If a vector of length>1, it will be taken as the position of the vertical gridlines.

h.grid

Position of the horizontal gridlines. Ignored if pl.type="conv".

col.grid

Color of the gridlines.

col.lines

Color of the conversion lines.

lwd

Numerical vector of length 3. Width of the conversion line and the prediction limits.

pch.points

Plot character for points.

cex.points

Character expansion for points.

col.points

Color of the points.

eqn

Logical. Should the conversion equation be printed on the plot.

col.eqn

Color of the conversion formula

font.eqn

font for the conversion formula

digits

The number of digits after the decimal point in the conversion formulae.

mult

Logical. Should ratios be plotted on a log-scale instead of differences on a linear scale? See description of the argument for BA.plot.

alpha

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.

Details

Using MethComp on the results from BA.est or AltReg is not necessary, as these two functions already return objetcs of class MethComp.

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.

lines.MethComp and points.MethComp adds conversion lines with prediction limits and points to a plot.

Value

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.

Author(s)

Bendix Carstensen, Steno Diabetes Center, bxc@steno.dk.

See Also

BA.est AltReg MCmcmc

Examples

1
2
3
4
5
6
7
8
data( ox )
BA.ox <- BA.est( ox, linked=TRUE )
print( BA.ox )
## Not run: 
AR.ox <- AltReg( ox, linked=TRUE  )
print( AR.ox )
plot( AR.ox ) 
## End(Not run)

Example output

 Conversion between methods:
               alpha    beta sd.pred  LoA-lo  LoA-up
To:   From:                                         
CO    CO       0.000   1.000   3.146  -6.293   6.293
      pulse    2.470   1.000   6.169  -9.867  14.808
pulse CO      -2.470   1.000   6.169 -14.808   9.867
      pulse    0.000   1.000   5.649 -11.298  11.298

 Variance components (sd):
        IxR   MxI   res
CO    3.416 2.928 2.225
pulse 3.416 2.928 3.994

AltReg converged after  14 iterations  
Last convergence criterion was  0.000986343 

 Conversion between methods:
              alpha   beta sd.pred int(t-f) slope(t-f) sd(t-f)
To:   From:                                                   
CO    CO      0.000  1.000   2.906    0.000      0.000   2.906
      pulse  -2.159  1.063   6.385   -2.093      0.061   6.190
pulse CO      2.031  0.941   6.007    2.093     -0.061   6.190
      pulse   0.000  1.000   5.769    0.000      0.000   5.769

 Variance components (sd):
         s.d.
Method    IxR   MxI   res
  CO    3.521 2.978 2.055
  pulse 3.313 2.802 4.079
Relationships between methods:
 CO-pulse = -2.09+0.06(CO+pulse)/2 (6.19) 
 CO = -2.16+1.06pulse (6.38) 
 pulse = 2.03+0.94CO (6.01) 

MethComp documentation built on May 2, 2019, 5:06 p.m.

Related to MethComp in MethComp...