Title: | Consensus Value Constructor |
---|---|
Description: | An implementation of the International Bureau of Weights and Measures (BIPM) generalized consensus estimators used to assign the reference value in a key comparison exercise. This can also be applied to any interlaboratory study. Given a set of different sources, primary laboratories or measurement methods this package provides an evaluation of the variance components according to the selected statistical method for consensus building. It also implements the comparison among different consensus builders and evaluates the participating method or sources against the consensus reference value. Based on a diverse set of references, DerSimonian-Laird (1986) <doi:10.1016/0197-2456(86)90046-2>, for a complete list of references look at the reference section in the package documentation. |
Authors: | Hugo Gasca-Aragon |
Maintainer: | Hugo Gasca-Aragon <[email protected]> |
License: | GPL (>= 3) |
Version: | 0.3.2 |
Built: | 2024-11-26 06:32:56 UTC |
Source: | CRAN |
An implementation of the International Bureau of Weights and Measures (BIPM) generalized consensus estimators used to assign the reference value in a key comparison exercise. This can also be applied to any interlaboratory study. Given a set of different sources, primary laboratories or measurement methods this package provides an evaluation of the variance components according to the selected statistical method for consensus building. It also implements the comparison among different consensus builders and evaluates the participating method or sources against the consensus reference value. Based on a diverse set of references, DerSimonian-Laird (1986) <doi:10.1016/0197-2456(86)90046-2>, for a complete list of references look at the reference section in the package documentation. Partially based on the results published in Control clinical trials (1985). <https://doi.org/10.1016/0197-2456(86)90046-2> For a complete list of references see the reference section.
The DESCRIPTION file:
Package: | gconsensus |
Type: | Package |
Title: | Consensus Value Constructor |
Version: | 0.3.2 |
Date: | 2022-10-08 |
Author: | Hugo Gasca-Aragon |
Maintainer: | Hugo Gasca-Aragon <[email protected]> |
Description: | An implementation of the International Bureau of Weights and Measures (BIPM) generalized consensus estimators used to assign the reference value in a key comparison exercise. This can also be applied to any interlaboratory study. Given a set of different sources, primary laboratories or measurement methods this package provides an evaluation of the variance components according to the selected statistical method for consensus building. It also implements the comparison among different consensus builders and evaluates the participating method or sources against the consensus reference value. Based on a diverse set of references, DerSimonian-Laird (1986) <doi:10.1016/0197-2456(86)90046-2>, for a complete list of references look at the reference section in the package documentation. |
Depends: | R (>= 3.4), graphics (>= 3.4), stats (>= 3.4), MASS (>= 7.0), utils (>= 3.4), rjags (>= 4-8), coda (>= 0.13) |
License: | GPL (>= 3) |
Encoding: | UTF-8 |
NeedsCompilation: | no |
Packaged: | 2022-11-04 22:44:13 UTC; hgasca |
Repository: | CRAN |
Date/Publication: | 2022-11-04 23:50:02 UTC |
Config/pak/sysreqs: | jags |
Index of help topics:
comparison.gconsensus Obtains a set of generalized consensus estimates by different statistical methods for comparison purposes. doe.gconsensus Obtains the unilateral degrees of equivalence out of a generalized consensus object. gconsensus Generalized Consensus Contructor gconsensus-package Consensus Value Constructor plot.comparison Plot a gconsensus comparison object plot.doe Plot a "degrees of equivalence" object plot.gconsensus Plot a gconsensus object print.comparison Prints a Comparison Object. print.doe Prints a Doe Object. print.gconsensus Prints a gconsensus object toString.comparison Builds a detailed description string of the comparison object. toString.doe Builds a detailed description string of the doe object. toString.gconsensus Builds a detailed description string of the gconsenus object. vr.mle Finds the maximum likelihood estimate solution described by Vangel-Rukhin for the one way random effects model.
Hugo Gasca-Aragon
Maintainer: Hugo Gasca-Aragon <[email protected]>
1. Graybill and Deal (1959), Combining Unbiased Estimators, Biometrics, 15, pp. 543-550.
2. DerSimonian and Laird (1986), Meta-analysis in Clinical Trials, Controlled Clinical Trials, 7, pp. 177-188.
3. R. A. Horn, S. A. Horn and D. B. Duncan (1975), Estimating heteroscedastic variance in linear models. Journ. Amer. Statist. Assoc. 70, 380
4. M. S. Levenson, D. L. Banks, K. R. Eberhardt, L. M. Gill, W. F. Guthrie, H. K. Liu, M. G. Vangel, J. H. Yen, and N. F. Zhang (2000), An ISO GUM Approach to Combining Results from Multiple Methods, Journal of Research of the National Institute of Standards and Technology, Volume 105, Number 4.
5. John Mandel and Robert Paule (1970), Interlaboratory Evaluation of a Material with Unequal Number of Replicates, Analytical Chemistry, 42, pp. 1194-1197.
6. Robert Paule and John Mandel (1982), Consensus Values and Weighting Factors, Journal of Research of the National Bureau of Standards, 87, pp. 377-385.
7. Andrew Rukhin (2009), Weighted Means Statistics in Interlaboratory Studies, Metrologia, Vol. 46, pp. 323-331.
8. Andrew Ruhkin (2003), Two Procedures of Meta-analysis in Clinical Trials and Interlaboratory Studies, Tatra Mountains Mathematical Publications, 26, pp. 155-168.
9. Andrew Ruhkin and Mark Vangel (1998), Estimation of a Common Mean and Weighted Means Statistics, Journal of the American Statistical Association, Vol. 93, No. 441.
10. Andrew Ruhkin, B. Biggerstaff, and Mark Vangel (2000), Restricted Maximum Likelihood Estimation of a Common Mean and Mandel-Paule Algorithm, Journal of Statistical Planning and Inference, 83, pp. 319-330.
11. Mark Vangel and Andrew Ruhkin (1999), Maximum Likelihood Analysis for Heteroscedastic One-Way Random Effects ANOVA in Interlaboratory Studies, Biometrics 55, 129-136.
12. Susannah Schiller and Keith Eberhardt (1991), Combining Data from Independent Analysis Methods, Spectrochimica, ACTA 46 (12).
13. Bimal Kumar Sinha (1985), Unbiased Estimation of the Variance of the Graybill-Deal Estimator of the Common Mean of Several Normal Populations, The Canadian Journal of Statistics, Vol. 13, No. 3, pp. 243-247.
14. Nien-Fan Zhang (2006), The Uncertainty Associated with The Weighted Mean of Measurement Data, Metrologia, 43, PP. 195-204.
15. CCQM (2013), CCQM Guidance note: Estimation of a Consensus KCRV and associated Degrees of Equivalence, Version 10.
16. Knapp G. and Hartung J. (2003), Improved tests for a random effects meta-regression with a single covariate, Statistics in Medicine, Vol 22, Issue 17, pp 2693-2710
ilab <- list( data = data.frame( participant = c("BAM", "IRMM", "LGC", "NARL", "NIST", "NMIJ", "NRC"), code = paste0("p", c(1:7)), method = rep(1, 7), value = c(10.21, 10.9, 10.94, 10.58, 10.81, 9.62, 10.8), unit = rep("\\micro \\kilogram/\\kilogram", 7), expandedUnc = c(0.381, 0.250, 0.130, 0.410, 0.445, 0.196, 0.093), n = rep(1, 7), coverageFactor = rep(2, 7), coverageProbability = rep(0.95, 7), method.type = rep("p", 7), included = rep(1, 7)), symbol = rep(1, 7), symbol.Fillcolor = rep(1, 7), comments = rep("", 7), info = list(variable = c("Software", "Institute", "Exercise", "Author", "Date", "Measurand", "Units"), value = c("consensus", "BIPM", "CCQM-K25", "Michele Schantz & Stephen Wise", "12-12-2003", "PCB 105", "\\micro \\kilogram/\\kilogram")) ) aConsensus <- gconsensus(ilab, method = "DL1", config = list( signif.digits = 2, display.order = "location", display.orientation = "horizontal", display.shownames = TRUE, tab.size = 12, alpha = 0.05, expansion.factor.type = "small.sample", tau = mad(ilab$data$value), unreliable.uncertainties = FALSE, MC_samples = 1e5, MC_seed = 12345, MC_use.HKSJ.adjustment = TRUE, MC_interval.type = "symmetric", MC_use.parallel.computing = FALSE, filename = "hb_consensus_model.txt" ) ) print(aConsensus)
ilab <- list( data = data.frame( participant = c("BAM", "IRMM", "LGC", "NARL", "NIST", "NMIJ", "NRC"), code = paste0("p", c(1:7)), method = rep(1, 7), value = c(10.21, 10.9, 10.94, 10.58, 10.81, 9.62, 10.8), unit = rep("\\micro \\kilogram/\\kilogram", 7), expandedUnc = c(0.381, 0.250, 0.130, 0.410, 0.445, 0.196, 0.093), n = rep(1, 7), coverageFactor = rep(2, 7), coverageProbability = rep(0.95, 7), method.type = rep("p", 7), included = rep(1, 7)), symbol = rep(1, 7), symbol.Fillcolor = rep(1, 7), comments = rep("", 7), info = list(variable = c("Software", "Institute", "Exercise", "Author", "Date", "Measurand", "Units"), value = c("consensus", "BIPM", "CCQM-K25", "Michele Schantz & Stephen Wise", "12-12-2003", "PCB 105", "\\micro \\kilogram/\\kilogram")) ) aConsensus <- gconsensus(ilab, method = "DL1", config = list( signif.digits = 2, display.order = "location", display.orientation = "horizontal", display.shownames = TRUE, tab.size = 12, alpha = 0.05, expansion.factor.type = "small.sample", tau = mad(ilab$data$value), unreliable.uncertainties = FALSE, MC_samples = 1e5, MC_seed = 12345, MC_use.HKSJ.adjustment = TRUE, MC_interval.type = "symmetric", MC_use.parallel.computing = FALSE, filename = "hb_consensus_model.txt" ) ) print(aConsensus)
Obtains a set of generalized consensus estimates.
comparison.gconsensus(x, methods, build.model = NULL, get.samples = NULL)
comparison.gconsensus(x, methods, build.model = NULL, get.samples = NULL)
x |
consensus object, containing the definition of the participants' information. |
methods |
vector of strings, containing the statistical methods to be used in obtaining the consensus values. |
build.model |
function, NULL by default, the current function to build a JAGS measurand model. |
get.samples |
function, NULL by default, the current function to obtain CORA samples out of the JAGS model. |
The default function requires the default parameters (x, ...), the next version will replace the formal parameters with the default signature.
fit |
a data.frame object, consensus value estimates by the specified methods |
gconsensus |
the current estimated gconsensus as provided in the x parameter |
total.included.participants |
a numeric, the current number of included participating sources |
Hugo Gasca-Aragon
Maintainer: Hugo Gasca-Aragon <[email protected]>
gconsensus
, print.comparison
, plot.comparison
Obtains the unilateral degrees of equivalence from a generalized consensus object.
doe.gconsensus(x)
doe.gconsensus(x)
x |
A generalized consensus object |
The unilateral degrees of equivalence are obtained from the participants data and the estimated generalized consensus value described in the gconsensus value.
A doe object containing the unilateral degrees of equivalence.
fit |
a data.frame with the source code, source lab name, value, expanded uncertainty, unit, coverage factor, probability coverage and tau. |
gconsensus |
the generalized consensus object the evaluation is based on. |
Hugo Gasca-Aragon
Maintainer: Hugo Gasca-Aragon <[email protected]>
gconsensus
, print.doe
, plot.doe
Compute a set of estimates for the generalized consensus value from a set of sources.
gconsensus(ilab, method = "mean", build.model = NULL, get.samples = NULL, config = list(alpha = 0.05, expansion.factor.type = "naive", tau = mad(ilab$data$value), unreliable.uncertainties = FALSE, MC_samples = 1e5, MC_burn_in = 1000, MC_seed = NA, MC_use.HKSJ.adjustment = FALSE, filename = "hb_consensus_model.txt"))
gconsensus(ilab, method = "mean", build.model = NULL, get.samples = NULL, config = list(alpha = 0.05, expansion.factor.type = "naive", tau = mad(ilab$data$value), unreliable.uncertainties = FALSE, MC_samples = 1e5, MC_burn_in = 1000, MC_seed = NA, MC_use.HKSJ.adjustment = FALSE, filename = "hb_consensus_model.txt"))
ilab |
ilab object, containing the definition of the participating source/experts/laboratories. |
method |
string, the current statistical method for estimating the consensus value. The list of current valid methods is:
|
build.model |
a function (NULL by default) to build a JAGS model |
get.samples |
a function (NULL by dafault) to obtain the CODA samples based on the JAGS model |
config |
list, contains the configuration options used in the computational process. The complete list of options is:
|
The consensus estimation will vary with the specified method.
Display can be customized by using the options mechanism. Available options are:
display.signif.digits
an integer representing the number of significant digits to be obtained in the adaptative approach of the Monte Carlo simulation,
display.order
a string ("name", "code", "location", "dispersion") representing the order to be used for displaying the uncertainty contribution,
display.shownames
a boolean, if true source names are used otherwise source codes are used,
display.tab.size
an integer representing the column width used in formating data tables,
display.orientation
a string ("horizontal", "vertical"), plot orientation.
display.expandedUncertainty
a boolean, plot standard uncertainties or expanded uncertainties.
fit |
a data.frame with the value, expanded uncertainty, unit, expansion factor, probability coverage and tau, the between effect uncertainty. |
method |
statistical method used to estimate the consensus value. |
subset |
the subset of included values in the consensus value estimation. |
ilab |
the current participants' information. |
config |
the current configuration options provided for the consensus value estimation process. |
exercise |
the exercise the consensus belongs to. |
measurand |
the measurand the consensus belongs to. |
Hugo Gasca-Aragon
Maintainer: Hugo Gasca-Aragon <[email protected]>
doe.gconsensus
, print.gconsensus
, plot.gconsensus
Shows the confidence intervals associated with the different gconsensus values specified in the comparison.
## S3 method for class 'comparison' plot(x, ...)
## S3 method for class 'comparison' plot(x, ...)
x |
gconsensus comparison object, containing the estimates for a set of gconsensus value. |
... |
any additional graphical parameter. |
The plot contains the confidence intervals associated with the set of gconsensus values under comparison.
Formating options of the plot:
display.order
a string, this is used to order the data source, valid values are: "location" for sorting based on the repoted means, "dispersion" for sorting based on reported variances, any other value for sorting based on typing order. Default value is "location".
display.shownames
a logical, if true then the participants names are used to identify the ploted values, otherwise the code value is used instead. Default value is FALSE.
display.orientation
a string, this is used to build the plot vertically or horizontally, valid values are: "horizontal" otherwise vertical is assumed, default value is "horizontal".
display.expandedUncertainty
a logical, if true then expanded uncertainty is used for plots, otherwise standard uncertainty is used. Default value is
a plot object
Hugo Gasca-Aragon
Maintainer: Hugo Gasca-Aragon <[email protected]>
comparison.gconsensus
, print.comparison
, plot
Plots a char showing the confidence interval for the unilateral degrees of equivalance associated to each participating laboratory.
## S3 method for class 'doe' plot(x, ...)
## S3 method for class 'doe' plot(x, ...)
x |
A doe object |
... |
Any additional graphical parameter |
Plot a unilateral degree of equivalence (doe) object.
Formating options of the plot:
display.order
a string, this is used to order the data source, valid values are: "location" for sorting based on the repoted means, "dispersion" for sorting based on reported variances, any other value for sorting based on typing order. Default value is "location".
display.shownames
a logical, if true then the participants names are used to identify the ploted values, otherwise the code value is used instead. Default value is FALSE.
display.orientation
a string, this is used to build the plot vertically or horizontally, valid values are: "horizontal" otherwise vertical is assumed, default value is "horizontal".
display.expandedUncertainty
a logical, if true then expanded uncertainty is used for plots, otherwise standard uncertainty is used. Default value is FALSE.
A plot of the doe object using the options displor.order and display.shownames, showing the confidence interval for the unilateral degree of equivalence attached to each participant.
Hugo Gasca-Aragon
Maintainer: Hugo Gasca-Aragon <[email protected]>
doe.gconsensus
, plot
, print.doe
Shows the probability distribution of the estimated gconsensus value.
## S3 method for class 'gconsensus' plot(x, ...)
## S3 method for class 'gconsensus' plot(x, ...)
x |
gconsensus object, containing the estimated gconsensus value by the specified statistical method. |
... |
any additional graphical parameter |
The plot shows the confidence interval for each of the participants' values, the consensus value and its confidence interval, on the right side the probability distribution associated with the consensus value is showed and a normal distribution with the same expected value and variace.
Formating options of the plot:
display.order
a string, this is used to order the data source, valid values are: "location" for sorting based on the repoted means, "dispersion" for sorting based on reported variances, any other value for sorting based on typing order. Default value is "location".
display.shownames
a logical, if true then the participants names are used to identify the ploted values, otherwise the code value is used instead. Default value is FALSE.
display.orientation
a string, this is used to build the plot vertically or horizontally, valid values are: "horizontal" otherwise vertical is assumed, default value is "horizontal".
display.length.out
a numeric, this represents the number of points to build the mixture distribution, default value = 101.
display.expandedUncertainty
a logical, if true then expanded uncertainty is used for plots, otherwise standard uncertainty is used. Default value is FALSE.
a plot object.
Hugo Gasca-Aragon Maintainer: Hugo Gasca-Aragon <[email protected]>
gconsensus
, print.gconsensus
, plot
Prints the consensus comparison object. One line for each selected gconsensus method.
## S3 method for class 'comparison' print(x, ...)
## S3 method for class 'comparison' print(x, ...)
x |
comparison, object to be described. |
... |
any additional parameters. |
A displayed text containing a summary of the selected gconsensus methods.
Hugo Gasca-Aragon
Maintainer: Hugo Gasca-Aragon <[email protected]>
comparison.gconsensus
, plot.comparison
, toString.comparison
Prints a doe (unilateral degrees of equivalence) object.
## S3 method for class 'doe' print(x, ...)
## S3 method for class 'doe' print(x, ...)
x |
doe, object to be described. |
... |
any additional parameters. |
A displayed text containg a detailed description of the object.
Hugo Gasca-Aragon
Maintainer: Hugo Gasca-Aragon <[email protected]>
gconsensus
, doe.gconsensus
, toString.doe
Prints a gconsensus object
## S3 method for class 'gconsensus' print(x, ...)
## S3 method for class 'gconsensus' print(x, ...)
x |
a gconsensus object |
... |
any additional parameter |
option digits
is used.
A displayed text containing a detailed description of the object.
Hugo Gasca-Aragon
Maintainer: Hugo Gasca-Aragon <[email protected]>
gconsensus
, plot.gconsensus
, toString.gconsensus
This function converts a gconsensus comparison object into a string. The returned value contains a verbatim description of the object. This function is used to display the result of comparing several gconsensus values.
## S3 method for class 'comparison' toString(x, ...)
## S3 method for class 'comparison' toString(x, ...)
x |
comparison, object to be described. |
... |
any additional parameters. |
string, it contains a verbatim description of the comparison object.
Hugo Gasca-Aragon
Maintainer: Hugo Gasca-Aragon <[email protected]>
comparison.gconsensus
, print.comparison
This function converts a unilateral degrees of equivalence object into a string. The returned value contains a verbatim description of the object. This function is used to display the result of estimating the unilateral degrees of equivalence.
## S3 method for class 'doe' toString(x, ...)
## S3 method for class 'doe' toString(x, ...)
x |
doe, object to be described. |
... |
any additional parameters. |
string, it contains a verbatim description of the unilateral degrees of equivalence object.
Hugo Gasca-Aragon
Maintainer: Hugo Gasca-Aragon <[email protected]>
This function converts a gconsensus object into a string. The returned value contains a verbatim description of the object. This function is used to display the result of estimating the gconsensus value.
## S3 method for class 'gconsensus' toString(x, ...)
## S3 method for class 'gconsensus' toString(x, ...)
x |
gconsensus, object to be described. |
... |
any additional parameters. |
string, it contains a verbatim description of the gconsensus object.
Hugo Gasca-Aragon
Maintainer: Hugo Gasca-Aragon <[email protected]>
This function finds the mle solution to the one way random effects model.
vr.mle(xi, si2, ni, labi=c(1:length(xi)), max.iter=1000, tol=.Machine$double.eps^0.5, init.mu=mean(xi), init.sigma2=var(xi), trace=FALSE, alpha=0.05)
vr.mle(xi, si2, ni, labi=c(1:length(xi)), max.iter=1000, tol=.Machine$double.eps^0.5, init.mu=mean(xi), init.sigma2=var(xi), trace=FALSE, alpha=0.05)
xi |
numeric vector, represents the mean values. |
si2 |
numeric vector, represents the variances associated with a single measurement. |
ni |
integer vector, represents the number of observations associated with the reported mean values. |
labi |
vector, containing the associated labels of the participanting laboratories, source of the reported values (mean, variances, number of observations) |
max.iter |
integer, maximum number of iterations allowed. |
tol |
numeric, relative tolerance. |
init.mu |
numeric, initial consensus value. |
init.sigma2 |
numeric, initial between variance. |
trace |
logic, indicates if traceable information must be shown during the execution. |
alpha |
numeric, significance level. |
mu |
estimated consensus value by the method of maximum likelihood |
u.mu |
standard uncertainty estimation attached to the consensus value |
kp |
estimated expansion factor for the specified configuration options |
Hugo Gasca-Aragon Maintainer: Hugo Gasca-Aragon <[email protected]>
See also gconsensus