# create an uncertainty budget
cor.mat <- matrix(c(1, -0.7, -0.7, 1), 2, 2)
u.budget <- uncertaintyBudget(x = list(name=c("x0", "x1"),
mean = c(10, 20), u = c(1, 5), unit = c("kg", "kg"), dof = c(10, 10),
description = c("measurand mass", "sample mass"),
label = c("x[0]", "x[1]"), type = c("A", "A"), distribution = c("normal", "normal")),
y = cor.mat)
# estimate the measurand uncertainty using an uncertainty budget,
# a measurand definition and a selected estimating method.
GFO.res <- uncertainty(x = u.budget,
y = list(measurand_name = "ratio.GFO",
measurand_label = "ratio[GFO]",
measurand_model = "x0/x1",
measurand_description = "ratio of masses at 20 degrees celsius",
method = "GFO", alpha = 0.05))
# plot the estimated pdf of the measurand
if (FALSE) plot(GFO.res)
Run the code above in your browser using DataLab