cplot: Consistency plot for Key Comparisons In metRology: Support for Metrological Applications

Description

Produces a consistency plot for typical metrology comparison data.

Usage

 ```1 2 3 4 5 6``` ``` cplot(x,u,labels=names(x), p.adjust.method="holm", ordered=TRUE, breaks=c(0,0.001,0.01, 0.05, 0.1,1), col=terrain.colors(length(breaks)-1), log.p=FALSE, main=paste("Consistency map -", deparse(substitute(x))), subtitle=NULL, key=FALSE, key.width=2.54, key.height=0.6,...) ```

Arguments

 `x` Vector of reported values `u` Vector of length `length(x)` of standard uncertainties `labels` Vector of of length `length(x)` labels for x-axis marks. `p.adjust.method` p-value adjustment method; passed to `p.adjust`. `ordered` If `TRUE` (the default) observations are arranged in ascending order of `x`. `breaks` Vector of breaks; passed to `image`. `col` Vector of colours of length `length(breaks)-1`. Passed to `image`. `log.p` If `TRUE`, the plot shows `-log_10(p)`. `main, subtitle` Main and subtitle for plot. `key` If `TRUE` a key is added to the plot. `key.width, key.height` Width and height of key, if plotted. See details for specification. `...` Graphical parameters passed to `image`. If present, `cex.axis` is passed to `axis` for main figure axes only.

Details

Calculates the (square, symmetric matrix of) optionally adjusted p-values for a two-tailed z-test of `|x[i]-x[j]|/sqrt(u[i]^2+u[j]^2)` against zero and plots the p-values as an image.

`p.adjust` is called prior to plotting to correct for multiple comparisons. To suppress adjustment, set `p.adjust.method="none"`.

key.height is a fraction of the figure region height. key.width is the width of the key area in cm, unless under 1, in which case it is interpreted as a fraction of the plot region width.

If `log.p` is `TRUE` and `subtitle` `NULL`, a subtitle indicating the use of log.p is added to the plot,

Value

Invisibly returns a matrix of pairwise test p-values or, if `log.p==TRUE`, matrix of `-log_10(p)`.

Author(s)

S Ellison s.ellison@lgc.co.uk

`p.adjust`, `image`.
 ```1 2``` ``` data(Pb) cplot(Pb\$value, Pb\$u, key=TRUE) ```