Learn R Programming

propagate (version 1.3-0)

doGauge: Gauge propagate against published examples of measurement uncertainty evaluation

Description

Runs the demos of the package that reproduce the worked examples of the GUM (JCGM 100:2008, Annex H), its Supplements 1 and 2 (JCGM 101:2008, JCGM 102:2011), JCGM 106:2012 (conformity assessment), the EMUE Compendium, NIST Technical Note 1900 and the EURACHEM/CITAC Guide QUAM and, in demo COPULA, correlated non-Gaussian inputs (JCGM 101:2008, 9.4.3; Possolo 2010) checked against exact results. It writes their complete console output (code and results) to one HTML or PDF file per demo. In each demo, every recomputable published value is compared with the result of propagate, and the result of each comparison (PASS, NOTE or DIFF) is highlighted in the output. A summary table of all comparisons is printed and returned.

Usage

doGauge(demo = c("JCGM100", "JCGM101", "JCGM102", "JCGM106", "EMUE", "NIST1900", 
                 "QUAM", "COPULA"), output = c("html", "pdf"), outdir = tempdir(), 
                 fontsize = 20, silent = TRUE, 
                 dir = system.file("demo", package = "propagate"))

Value

Invisibly, a list with

files

the paths of the files written.

summary

a data frame with the number of PASS, NOTE and DIFF results of each demo.

Arguments

demo

one or several of the demos: "JCGM100" (GUM, Annex H), "JCGM101" (GUM Supplement 1, clause 9), "JCGM102" (GUM Supplement 2, clause 9), "JCGM106" (JCGM 106:2012, conformity assessment), "EMUE" (EMUE Compendium), "NIST1900" (NIST TN 1900), "QUAM" (EURACHEM/CITAC Guide CG 4, Appendix A) and "COPULA" (correlated non-Gaussian inputs with corDist: JCGM 101:2008, 9.4.3, Possolo 2010, and exact results). Default: all.

output

"html" (default) or "pdf": the format of the files written.

outdir

the directory in which the files <demo>.html or <demo>.pdf are written. The default is a temporary directory; use, e.g., getwd() to keep the files.

fontsize

the font size of the output in pixels (HTML); for PDF, the size is scaled accordingly and reduced if necessary, so that the longest line fits the page width.

silent

logical. If TRUE, messages and warnings issued while the demos run are suppressed. The progress of the demos and the summary table are always shown.

dir

the directory of the demo files; only needed to run modified copies of the demos.

Author

Andrej-Nikolai Spiess

Details

The published value is given in the demos as a character string, so that its number of decimals defines the rounding tolerance (half a unit of the last decimal). For Monte Carlo results, four Monte Carlo standard errors of both calculations (propagate and the published run) are added; where a published value was computed from rounded intermediate values that are printed in the same document, their propagated rounding is added as well (argument extra of the internal function gauge of the demos).

  • PASS: the value of propagate agrees with the published value within the tolerance.

  • NOTE: a documented discrepancy of the published value, e.g. a truncated instead of a rounded value, a value carried over from another calculation, or an inconsistency between a printed equation and its numerical result. The cause is explained in a comment in the demo.

  • DIFF: a deviation that is neither within the tolerance nor documented.

The demos use nsim = 1E6 Monte Carlo trials; running all demos takes several minutes. The expected result is DIFF = 0 for all demos. They can also be run individually, e.g. demo("JCGM101", package = "propagate").

References

GUM:
Evaluation of measurement data - Guide to the expression of uncertainty in measurement.
JCGM 100:2008. Joint Committee for Guides in Metrology (2008).
tools:::Rd_expr_doi("10.59161/JCGM100-2008E")

GUM Supplements and conformity assessment:
Evaluation of measurement data - Supplement 1 to the "Guide to the expression of uncertainty in measurement" - Propagation of distributions using a Monte Carlo method.
JCGM 101:2008. Joint Committee for Guides in Metrology (2008).
tools:::Rd_expr_doi("10.59161/JCGM101-2008")

Evaluation of measurement data - Supplement 2 to the "Guide to the expression of uncertainty in measurement" - Extension to any number of output quantities.
JCGM 102:2011. Joint Committee for Guides in Metrology (2011).
tools:::Rd_expr_doi("10.59161/JCGM102-2011")

Evaluation of measurement data - The role of measurement uncertainty in conformity assessment.
JCGM 106:2012. Joint Committee for Guides in Metrology (2012).
tools:::Rd_expr_doi("10.59161/JCGM106-2012")

Collections of worked examples:
Compendium of examples: Good practice in evaluating measurement uncertainty (EMUE), version 2.
van der Veen AMH, Cox MG (Eds.).
Zenodo (2021).
tools:::Rd_expr_doi("10.5281/zenodo.5142180")

Quantifying Uncertainty in Analytical Measurement (QUAM:2012.P1), 3rd edition.
Ellison SLR, Williams A (Eds.).
EURACHEM/CITAC Guide CG 4 (2012). ISBN 978-0-948926-30-3.
https://www.eurachem.org/index.php/publications/guides/quam

Simple Guide for Evaluating and Expressing the Uncertainty of NIST Measurement Results.
Possolo A.
NIST Technical Note 1900, National Institute of Standards and Technology (2015).
tools:::Rd_expr_doi("10.6028/NIST.TN.1900")

Copulas:
Copulas for uncertainty analysis.
Possolo A.
Metrologia (2010), 47: 262-271.
tools:::Rd_expr_doi("10.1088/0026-1394/47/3/017")

See Also

propagate, propagateMV, conformity, corDist, demo(package = "propagate")

Examples

Run this code
# \donttest{
## one demo, file written to tempdir()
# res <- doGauge("JCGM106")
# res$summary
## all demos (several minutes):
# doGauge()
# }

Run the code above in your browser using DataLab