MCResult.plotResiduals: Plot Residuals of an MCResult Object

MCResult.plotResidualsR Documentation

Plot Residuals of an MCResult Object

Description

Plot Residuals of an MCResult Object

Usage

MCResult.plotResiduals(
  .Object,
  res.type = c("optimized", "y", "x"),
  xaxis = c("yhat", "both", "xhat"),
  ref.line = TRUE,
  ref.line.col = "red",
  ref.line.lty = 2,
  ref.line.lwd = 1,
  main = NULL,
  xlab = NULL,
  ylab = NULL,
  add.grid = TRUE,
  ...
)

Arguments

.Object

object of type "MCResult".

res.type

If res.type="y" the difference between the test method and it's prediction will be drawn. If res.type="x" the reference method and it's prediction will be drawn. In case ordinary and weighted ordinary linear regression this difference will be zero.

xaxis

Values on the x-axis. One can choose from estimated values of x (xaxis="xhat"), y (xaxis="xhat") or the mean of estimated values of x and y (xaxis="both"). If res.type="optimized" the proper type of residuals for each regression will be drawn.

ref.line

logical value. If ref.line = TRUE (default), the reference line will be drawn.

ref.line.col

reference line color.

ref.line.lty

reference line type.

ref.line.lwd

reference line width.

main

character string specifying the main title of the plot

xlab

label for the x-axis

ylab

label for the y-axis

add.grid

logical value. If add.grid = TRUE (default) the gridlines will be drawn.

...

further graphical parameters

Value

No return value, instead a plot is generated

See Also

getResiduals, plot.mcr, plotDifference, plotBias, compareFit

Examples

    data(creatinine,package="mcr")
    x <- creatinine$serum.crea
    y <- creatinine$plasma.crea

    # Deming regression fit.
    # The confidence intercals for regression coefficients
    # are calculated with analytical method
    model <- mcreg( x,y,error.ratio=1,method.reg="WDeming", method.ci="jackknife",
                     mref.name = "serum.crea", mtest.name = "plasma.crea", na.rm=TRUE )
    plotResiduals(model, res.type="optimized", xaxis="both" )
    plotResiduals(model, res.type="y", xaxis="yhat")

mcr documentation built on Sept. 23, 2024, 5:10 p.m.