MCResult.plotBias | R Documentation |
This function plots the estimated systematical bias
( Intercept + Slope * Refrencemethod ) - Referencemethod
with confidence bounds, covering the whole range of reference method X
or only part of it.
MCResult.plotBias(
x,
xn = 100,
alpha = 0.05,
add = FALSE,
prop = FALSE,
xlim = NULL,
ylim = NULL,
bias = TRUE,
bias.lty = 1,
bias.lwd = 2,
bias.col = NULL,
ci.area = TRUE,
ci.area.col = NULL,
ci.border = FALSE,
ci.border.col = NULL,
ci.border.lwd = 1,
ci.border.lty = 2,
zeroline = TRUE,
zeroline.col = NULL,
zeroline.lty = 2,
zeroline.lwd = 1,
main = NULL,
sub = NULL,
add.grid = TRUE,
xlab = NULL,
ylab = NULL,
cut.point = NULL,
cut.point.col = "red",
cut.point.lwd = 2,
cut.point.lty = 1,
...
)
x |
object of class "MCResult". |
xn |
# number of poits for drawing of confidence bounds/area. |
alpha |
numeric value specifying the 100(1- |
add |
logical value. If |
prop |
a logical value. If |
xlim |
limits of the x-axis. If |
ylim |
limits of the y-axis. If |
bias |
logical value. If |
bias.lty |
type of the bias line. |
bias.lwd |
width of the bias line. |
bias.col |
color of the bias line. |
ci.area |
logical value. If |
ci.area.col |
color of the confidence area. |
ci.border |
logical value. If ci.border=TRUE the confidence limits will be drawn. |
ci.border.col |
color of the confidence limits. |
ci.border.lwd |
line width of confidence limits. |
ci.border.lty |
line type of confidence limits. |
zeroline |
logical value. If |
zeroline.col |
color of the zero-line. |
zeroline.lty |
type of the zero-line. |
zeroline.lwd |
width of the zero-line. |
main |
character string. The main title of plot. If |
sub |
character string. The subtitle of plot. If |
add.grid |
logical value. If |
xlab |
label for the x-axis |
ylab |
label for the y-axis |
cut.point |
numeric value. Decision level of interest. |
cut.point.col |
color of the confidence bounds at the required decision level. |
cut.point.lwd |
line width of the confidence bounds at the required decision level. |
cut.point.lty |
line type of the confidence bounds at the required decision level. |
... |
further graphical parameters |
No return value, instead a plot is generated
calcBias
, plot.mcr
, plotResiduals
, plotDifference
, compareFit
#library("mcr")
data(creatinine,package="mcr")
creatinine <- creatinine[complete.cases(creatinine),]
x <- creatinine$serum.crea
y <- creatinine$plasma.crea
# Calculation of models
m1 <- mcreg(x,y,method.reg="WDeming", method.ci="jackknife",
mref.name="serum.crea",mtest.name="plasma.crea", na.rm=TRUE)
m2 <- mcreg(x,y,method.reg="WDeming", method.ci="bootstrap",
method.bootstrap.ci="BCa",mref.name="serum.crea",
mtest.name="plasma.crea", na.rm=TRUE)
# Grafical comparison of systematical Bias of two models
plotBias(m1, zeroline=TRUE,zeroline.col="black",zeroline.lty=1,
ci.area=TRUE,ci.border=FALSE, ci.area.col=grey(0.9),
main = "Bias between serum and plasma creatinine",
sub="Comparison of Jackknife and BCa-Bootstrap confidence bounds ")
plotBias(m2, ci.area=FALSE, ci.border=TRUE, ci.border.lwd=2,
ci.border.col="red",bias=FALSE ,add=TRUE)
includeLegend(place="topleft",models=list(m1,m2), lwd=c(10,2),
lty=c(2,1),colors=c(grey(0.9),"red"), bias=TRUE,
design="1", digits=4)
# Drawing of proportional bias
plotBias(m1, ci.area=FALSE, ci.border=TRUE)
plotBias(m1, ci.area=FALSE, ci.border=TRUE, prop=TRUE)
plotBias(m1, ci.area=FALSE, ci.border=TRUE, prop=TRUE, cut.point=0.6)
plotBias(m1, ci.area=FALSE, ci.border=TRUE, prop=TRUE, cut.point=0.6,
xlim=c(0.4,0.8),cut.point.col="orange", cut.point.lwd=3, main ="")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.