View source: R/MCResultMethods.r
MCResult.plot | R Documentation |
Plot 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),
...
)
x |
object of class "MCResult". |
alpha |
numeric value specifying the 100(1- |
xn |
number of points (default 20) for calculation of confidence bounds. |
equal.axis |
logical value. If |
xlim |
limits of the x-axis. If |
ylim |
limits of the y-axis. If |
xaxp |
ticks of the x-axis. If |
yaxp |
ticks of the y-axis. If |
x.lab |
label of x-axis. Default is the name of reference method. |
y.lab |
label of y-axis. Default is the name of test method. |
add |
logical value. If |
draw.points |
logical value. If |
points.col |
Color of data points. |
points.pch |
Type of data points (see |
points.cex |
Size of data points (see |
reg |
Logical value. If |
reg.col |
Color of regression line. |
reg.lty |
Type of regression line. |
reg.lwd |
The width of regression line. |
identity |
logical value. If |
identity.col |
The color of identity line. |
identity.lty |
The type of identity line. |
identity.lwd |
the width of identity line. |
ci.area |
logical value. If |
ci.area.col |
the color of confidence area. |
ci.border |
logical value. If |
ci.border.col |
The color of confidence limits. |
ci.border.lty |
The line type of confidence limits. |
ci.border.lwd |
The line width of confidence limits. |
add.legend |
logical value. If |
legend.place |
The position of legend: "topleft","topright","bottomleft","bottomright". |
main |
String value. The main title of plot. If |
sub |
String value. The subtitle of plot. If |
add.cor |
Logical value. If |
cor.method |
a character string indicating which correlation coefficient is to be computed. One of "pearson" (default), "kendall", or "spearman", can be abbreviated. |
add.grid |
Logical value. If |
digits |
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
plotBias
, plotResiduals
, plotDifference
, compareFit
,includeLegend
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)
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.