stochContr {propagate}R Documentation

Stochastic contribution analysis of Monte Carlo simulation-derived propagated uncertainty

Description

Conducts a "stochastic contribution analysis" by calculating the change in propagated uncertainty when each of the simulated variables is kept constant at its mean, i.e. the uncertainty is removed.

Usage

stochContr(prop, plot = TRUE)

Arguments

prop

a propagate object.

plot

logical. If TRUE, a boxplot with the original and mean-value propagated distribution.

Details

This function takes the Monte Carlo simulated data XnX_n from a propagate object (...$datSIM), sequentially substitutes each variable βi\beta_i by its mean βiˉ\bar{\beta_i} and then re-evaluates the output distribution Yn=f(β,Xn)Y_n = f(\beta, X_n). Optional boxplots are displayed that compare the original Yn(orig)Y_n\mathrm{(orig)} to those obtained from removing σ\sigma from each βi\beta_i. Finally, the relative contribution CiC_i for all βi\beta_i is calculated by Ci=σ(Yn(orig))σ(Yn)C_i = \sigma(Y_n\mathrm{(orig)})-\sigma(Y_n), and divided by its sum so that i=1nCi=1\sum_{i=1}^n C_i = 1.

Value

The relative contribution CiC_i for all variables.

Author(s)

Andrej-Nikolai Spiess

Examples

a <- c(15, 1)
b <- c(100, 5)
c <- c(0.5, 0.02)
DAT <- cbind(a, b, c)
EXPR <- expression(a * b^sin(c))
RES <- propagate(EXPR, DAT, nsim = 100000)
stochContr(RES)

[Package propagate version 1.0-6 Index]