uncertMC_class: The 'uncertMC' class

Description Usage Arguments Details Value Methods Author(s) References See Also Examples

Description

Object returned by uncertMC calls and by uncertainty with method="MC".

summary.uncertMC is currently an alias for print.uncertMC.

Usage

1
2
3
4
5
6
7
   ## S3 method for class 'uncertMC'
print(x, digits=NULL, right=FALSE, 
                      ..., simplify=TRUE, minimise=FALSE)

   ## S3 method for class 'uncertMC'
summary(object, digits=NULL, right=FALSE, 
                      ..., simplify=TRUE, minimise=FALSE)

Arguments

x, object

An object of class "uncertMC"

digits

Number of digits to display in budget and (if present) distribution parameter lists. Passed to format for distribution parameter list and to print.data.frame for output.

right

If TRUE, strings in uncertainty budget are right-justified. This differs from the default in print.data.frame.

...

Other parameters passed to print.data.frame

simplify

If TRUE, only the call, evaluation method, budget, value y and combined uncertainty (u.y) are printed.

minimise

If TRUE, the header, call, expr and evaluation method are suppressed; this is the mode used when printing an uncertMC object as part of an uncert object.

Details

An object of class "uncertMC" inherits from class "uncert". In addition to the contents of the "uncert" object, it contains the results from the MC replication as a list MC. The complete description is:

call

The matched call

expr

The expression, formula or function supplied to uncertMC.

method

The uncertainty evaluation method used (always 'MC').

B

The number of Monte Carlo replicates used.

budget

A data frame consisting of:

x

The starting values x.

u

The standard uncertainties in input quantities (originally provided as u)

df

The degrees of freedom asscociated with u

c

Sensitivity coefficients estimated from the MC output (see uncertMC for how this is done).

distrib

If available, a named list of the distributions associated with u. The list contains either root nams of distribution functions (e.g "norm" or function definitions.

distrib.pars

If available, a list of lists of parameters describing the distributions associated with u.

additional

If supplied, any relevant parameters other than those in $budget$x (typically addditional constants passed to function or expression methods)

cov

The covariance matrix used

cor

The correlation matrix used

cov.xy

A data frame of covariances between x and y. The Row names correspond to the correlation method used. For uncertMC objects only "pearson" is currently supported (because "kendall" and "spearman" take a very long time to compute)

cor.xy

A data frame of correlations between x and y, of the same form as cov.xy

MC

A list containing:

seed

The value of .Random.seed when uncertMC was called.

y

The B Monte Carlo replicates of the standard uncertainty calculated as sd(y).

x.mc

If uncertMC is called with keep.x=TRUE, a data frame whose columns are the Monte Carlo replicates of the variables in x.

Value

print and summary methods invisibly return the original object.

Methods

print

The print method provides a formatted printout of the object. By default, simplify=TRUE; this displays a shortened listing. Columns in $data are suppressed if all NA.

summary

summary is currently an alias for the print method.

Author(s)

S. L. R. Ellison s.ellison@lgc.co.uk

References

None.

See Also

uncert, uncertMC, uncert-class, print.data.frame, format.

Examples

1
2
3
4
5
6
  set.seed(13*17)
  expr <- expression(a+b*2+c*3+d/2)
  x <- list(a=1, b=3, c=2, d=11)
  u <- lapply(x, function(x) x/10)
  u.expr<-uncertMC(expr, x, u, distrib=rep("norm", 4), method="MC")
  print(u.expr)

metRology documentation built on May 2, 2019, 12:20 p.m.