MCResult.plot.RdPlot method X (reference) vs. method Y (test) with (optional) line of identity, regression line and confidence bounds for response.
MCResult.plot(
x,
alpha = 0.05,
xn = 20,
equal.axis = FALSE,
xlim = NULL,
ylim = NULL,
xaxp = NULL,
yaxp = NULL,
x.lab = x@mnames[1],
y.lab = x@mnames[2],
add = FALSE,
draw.points = TRUE,
points.col = "black",
points.pch = 1,
points.cex = 0.8,
reg = TRUE,
reg.col = NULL,
reg.lty = 1,
reg.lwd = 2,
identity = TRUE,
identity.col = NULL,
identity.lty = 2,
identity.lwd = 1,
ci.area = TRUE,
ci.area.col = NULL,
ci.border = FALSE,
ci.border.col = NULL,
ci.border.lty = 2,
ci.border.lwd = 1,
add.legend = TRUE,
legend.place = c("topleft", "topright", "bottomleft", "bottomright"),
main = NULL,
sub = NULL,
add.cor = TRUE,
cor.method = c("pearson", "kendall", "spearman"),
add.grid = TRUE,
digits = list(coef = 2, cor = 3),
...
)object of class "MCResult".
numeric value specifying the 100(1-alpha)% confidence bounds.
number of points (default 20) for calculation of confidence bounds.
logical value. If equal.axis=TRUE x-axis will be equal to y-axis.
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.
ticks of the x-axis. If xaxp=NULL the x-ticks will be calculated automatically.
ticks of the y-axis. If yaxp=NULL the y-ticks will be calculated automatically.
label of x-axis. Default is the name of reference method.
label of y-axis. Default is the name of test method.
logical value. If add=TRUE, the plot will be drawn in current graphical window.
logical value. If draw.points=TRUE, the data points will be drawn.
Color of data points.
Type of data points (see par()).
Size of data points (see par()).
Logical value. If reg=TRUE, the regression line will be drawn.
Color of regression line.
Type of regression line.
The width of regression line.
logical value. If identity=TRUE the identity line will be drawn.
The color of identity line.
The type of identity line.
the width of identity line.
logical value. If ci.area=TRUE (default) the confidence area will be drawn.
the color of confidence area.
logical value. If ci.border=TRUE the confidence limits will be drawn.
The color of confidence limits.
The line type of confidence limits.
The line width of confidence limits.
logical value. If add.legend=FALSE the plot will not have any legend.
The position of legend: "topleft","topright","bottomleft","bottomright".
String value. The main title of plot. If main=NULL it will include regression name.
String value. 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 add.cor=TRUE the correlation coefficient will be shown.
a character string indicating which correlation coefficient is to be computed. One of "pearson" (default), "kendall", or "spearman", can be abbreviated.
Logical value. If add.grid=TRUE (default) the gridlines will be drawn.
list with the number of digits for the regression equation and the correlation coefficient.
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
m1 <- mcreg(x,y,method.reg="Deming", mref.name="serum.crea",
mtest.name="plasma.crea", na.rm=TRUE)
m2 <- 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.
plot(m1, xlim=c(0.5,3),ylim=c(0.5,3), add.legend=FALSE,
main="Deming vs. weighted Deming regression",
points.pch=19,ci.area=TRUE, ci.area.col=grey(0.9),
identity=FALSE, add.grid=FALSE, sub="")
plot(m2, ci.area=FALSE, ci.border=TRUE, ci.border.col="red3",
reg.col="red3", add.legend=FALSE,
draw.points=FALSE,add=TRUE)
includeLegend(place="topleft",models=list(m1,m2),
colors=c("darkblue","red"), design="1", digits=2)