Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/importance_rank.R
Provides the importance ranks of the components (random variables) of a stressed model for different sensitivity measures.
1 2 3 4 5 6 7 8 9 |
object |
A |
xCol |
Numeric or character vector, (names of) the columns
of the underlying data of the |
wCol |
Vector, the columns of the scenario weights
of the |
type |
Character, one of |
f |
A function, or list of functions, that, applied to
|
k |
A vector or list of vectors, same length as |
s |
A function that, applied to |
For the definition of the sensitivity
measures (type), see sensitivity.
A data.frame containing the importance ranks of the
stressed model for different sensitivity measures. Small values
correspond to large sensitivities. Different rows correspond
to different random variables. The first two rows specify the
stress and type of the sensitivity measure on
which the ranking is calculated.
Silvana M. Pesenti
See sensitivity for the values of the
sensitivity measures, plot_sensitivity for plotting
sensitivity measures and summary for a
summary statistic of a stressed model.
1 2 3 4 5 6 7 8 9 10 11 12 | ## example with a stress on VaR
set.seed(0)
x <- as.data.frame(cbind(
"log-normal" = rlnorm(1000),
"gamma" = rgamma(1000, shape = 2)))
res1 <- stress(type = "VaR", x = x,
alpha = c(0.9, 0.95), q_ratio = 1.05)
importance_rank(res1, wCol = 1:2, type = "Gamma")
## sensitivity of log-transformed data
importance_rank(res1, wCol = 1, type = "all",
f = list(function(x)log(x), function(x)log(x)), k = list(1, 2))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.