MCResult.plotBias.RdThis 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,
...
)object of class "MCResult".
# number of poits for drawing of confidence bounds/area.
numeric value specifying the 100(1-alpha)% confidence level of confidence intervals (Default is 0.05).
logical value. If add=TRUE, the grafic will be drawn in current grafical window.
a logical value. If prop=TRUE the proportional bias \( \%bias(Xc) = [ Intercept + (Slope-1) * Xc ] / Xc\) will be drawn.
limits of the x-axis. If xlim=NULL the x-limits will be calculated automatically.
limits of the y-axis. If ylim=NULL the y-limits will be calculated automatically.
logical value. If identity=TRUE the bias line will be drawn. If ci.bounds=FALSE and ci.area=FALSE the bias line will be drawn always.
type of the bias line.
width of the bias line.
color of the bias line.
logical value. If ci.area=TRUE (default) the confidence area will be drawn.
color of the confidence area.
logical value. If ci.border=TRUE the confidence limits will be drawn.
color of the confidence limits.
line width of confidence limits.
line type of confidence limits.
logical value. If zeroline=TRUE the zero-line will be drawn.
color of the zero-line.
type of the zero-line.
width of the zero-line.
character string. The main title of plot. If main = NULL it will include regression name.
character string. The subtitle of plot. If sub=NULL and ci.border=TRUE or ci.area=TRUE it will include the art of confidence bounds calculation.
logical value. If grid=TRUE (default) the gridlines will be drawn.
label for the x-axis
label for the y-axis
numeric value. Decision level of interest.
color of the confidence bounds at the required decision level.
line width of the confidence bounds at the required decision level.
line type of the confidence bounds at the required decision level.
further graphical parameters
No return value, instead a plot is generated
#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)
#> Jackknife based calculation of standard error and confidence intervals according to Linnet's method.
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)
#> The global.sigma is calculated with Linnet's method
# 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 ="")