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 |
plot |
logical. If |
Details
This function takes the Monte Carlo simulated data from a
propagate
object (...$datSIM
), sequentially substitutes each variable by its mean
and then re-evaluates the output distribution
. Optional boxplots are displayed that compare the original
to those obtained from removing
from each
. Finally, the relative contribution
for all
is calculated by
, and divided by its sum so that
.
Value
The relative contribution 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)