barplot.mandel.kh {metRology} | R Documentation |
Barplot of Mandel's h or k statistics
Description
barplot.mandel.kh
produces a bar plot of Mandel's statistics, suitably
grouped and with appropriate indicator lines for unusual values.
Usage
## S3 method for class 'mandel.kh'
barplot(height, probs = c(0.95, 0.99), main,
xlab = attr(height, "grouped.by"),
ylab = attr(height, "mandel.type"), separators = TRUE,
zero.line = TRUE, ylim, p.adjust = "none",
frame.plot = TRUE, ...,
col.ind = 1, lty.ind = c(2, 1), lwd.ind = 1,
col.sep = "lightgrey", lwd.sep = 1, lty.sep = 1,
lwd.zero = 1, col.zero = 1, lty.zero = 1)
Arguments
height |
An object of class |
probs |
Indicator lines are drawn for these probabilities. Note that
|
main |
a main title for the plot. If missing, the default is
|
xlab |
a label for the x axis; defaults to the |
ylab |
a label for the x axis; defaults to the |
separators |
Logical; if |
zero.line |
logical; if |
ylim |
the y limits of the plot. For Mandel's k, the default lower limit is zero. |
p.adjust |
Correction method for probabilities. If not |
frame.plot |
Logical; If |
... |
Other (usually graphical) parameters passed to |
col.ind , lty.ind , lwd.ind |
Graphical parameters used for the indicator lines, recyckled to |
col.sep , lwd.sep , lty.sep |
Graphical parameters used for the separator lines. |
lwd.zero , col.zero , lty.zero |
Graphical parameters used for the zero line. |
Details
Mandel's statistics are traditionally plotted for inter-laboratory study data, grouped by laboratory, to give a rapid graphical view of laboratory bias and relative precision. This plot produces a grouped, side-by-side bar plot.
For classical Mandel statistics, indicator lines are drawn based on qmandelh
or qmandelk
as appropriate. For robust variants, indicator lines use
qnorm
for the statistic and
qf(probs, n, Inf)
for
the statistic. Note that this corresponds to taking the robust estimates of
location and scale as true values, so will be somewhat anticonservative.
Value
barplot.mandel.kh returns a numeric vector of mid-points of the groups along the x-axis.
Author(s)
S Ellison s.ellison@lgc.co.uk
References
Accuracy (trueness and precision) of measurement methods and results – Part 2: Basic method for the determination of repeatability and reproducibility of a standard measurement method. ISO, Geneva (1994).
See Also
mandel.h
, mandel.k
, mandel.kh
,
pmandelh
, pmandelk
for probabilities, quantiles etc.
See plot.mandel.kh
for the 'classic' Mandel plot.
Examples
data(RMstudy)
h <- with(RMstudy, mandel.h(RMstudy[2:9], g=Lab))
barplot(h, las=2) # Lab 4 shows consistent low bias;
# Lab 23 several extreme values.
#Use colours to identify particular measurands:
barplot(h, las=2, col=1:8)
legend("bottomleft", legend=names(h), fill=1:8, cex=0.7, bg="white")
#Example of Mandel's k:
k <- with(RMstudy, mandel.k(RMstudy[2:9], g=Lab))
barplot(k, las=2) # Lab 8 looks unusually variable;
# Lab 14 unusually precise