View source: R/summary.propagate.R
| summary.propagate | R Documentation |
Provides a printed summary of the results obtained by propagate, with many GUM (2008) and GUM Supplement 1 (2008) relevant statistics, as outlined in 'Details'.
## S3 method for class 'propagate'
summary(object, normality = FALSE, ...)
object |
an object returned from |
normality |
logical. If |
... |
other parameters for future methods. |
summary.propagate provides an extensive output and overview on the results of propagate:
For classical JCGM 100:2008 output:
Results of the first- (mean.1, u.1) and second-order (mean.2, u.2) uncertainty propagation, as well as from MC simulation (mean.MC, u.MC, median.MC, mad.MC), including confidence intervals
The Welch-Satterthwaite degrees of freedom \mathrm{ws.df}, as obtained from WelchSatter
The coverage factor k = t_{\mathrm{ws.df}}(1-\alpha/2)
The expanded uncertainty U = k \cdot u, where u can be either first-order u.1 or second-order u.2, see propagate
The symbolic gradient matrix \nabla, also often termed \mathbf{G}, \mathbf{J} or \mathbf{C_x} (JCGM 102:2011)
The evaluated gradient matrix, also known as "sensitivities", c_i = \mathrm{eval}(\partial f / \partial x_i)
The relative contribution (summing up to 1)
\mathrm{RC}_{ii} = \mathrm{diag}\left(\frac{|c_i \cdot c_j \cdot \Sigma_{ij}|}{\sum_{k,\ell} |c_k \cdot c_\ell \cdot \Sigma_{k\ell}|}\right)
The symbolic Hessian matrix \mathbf{H}, also often termed \nabla^2
The evaluated Hessian matrix h_{ij} = \mathrm{eval}\left(\frac{\partial^2 f}{\partial x_i \partial x_j}\right)
The input covariance matrix \mathbf{\Sigma}, as provided from (i) the uncertainies in the 2nd row of the input data, (ii) estimation from the raw data, or (iii) an externally supplied one. Also often termed \mathbf{V} or \mathbf{U_x} (JCGM 102:2011)
For JCGM 101:2008, but extended with checks of input parameters for the Copula vs. the output attributes of the MC-generated random matrix \mathbf{X}^\text{MC}:
The covariance estimated from the MC simulations of the Copula distribution, \hat{\mathbf{\Sigma}}^\text{MC} = \mathrm{cov}(\mathbf{X}^\text{MC})
The Frobenius norm of the estimated vs. input covariance matrix, \|\hat{\mathbf{\Sigma}}^\text{MC} - \mathbf{\Sigma} \|_F
The correlation matrix \mathbf{R} derived from \mathbf{\Sigma} (by cov2cor) to construct the Gaussian Copula with t-margins, \mathcal{C}^{\text{Gauss, t}}
The correlation matrix estimated from the MC simulations of the Copula distribution, \hat{\mathbf{R}}^\text{MC} = \mathrm{cor}(\mathbf{X}^\text{MC})
The Frobenius norm of the estimated vs. input correlation matrix, \|\hat{\mathbf{R}}_\text{MC} - \mathbf{R} \|_F
A comparison of Copula-input and MC-derived moments/DOFs, to check for similarity and success of the Copula construction/MC sampling
Further repeated subsampling tests for normality on the evaluated MC samples, Y = \mathbf{X}^\text{MC}:
Skewness and Excess Kurtosis
Shapiro-Wilk test (2000 repeats, 5000 samples)
Anderson-Darling test (1000 repeats, 10000 samples)
Lilliefors test (1000 repeats, 10000 samples)
For the three tests, the median of the log p-values is calculated, as the resulting p-distribution is more or less log-normal, \mathrm{med}(P) = \mathrm{exp}(\mathrm{med}(\mathrm{log}(P))).
A printed output with the items listed under 'Details'.
Andrej-Nikolai Spiess
See propagate
EXPR1 <- expression(x^2 * sin(y))
x <- c(5, 0.01)
y <- c(1, 0.01)
DF1 <- cbind(x, y)
RES1 <- propagate(expr = EXPR1, data = DF1, type = "stat",
nsim = 10000, check = TRUE)
summary(RES1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.