Learn R Programming

SWIM (version 1.0.0)

convert_SWIMw_to_SWIM: Convert SWIMw to SWIM

Description

Convert SWIMw to SWIM

Usage

convert_SWIMw_to_SWIM(object)

Arguments

object

A SWIMw object

Value

A SWIM object containing:

  • x, a data.frame containing the data;

  • new_weights, a list of functions, that applied to the kth column of x, generates the vectors of scenario weights. Each component corresponds to a different stress;

  • type = "VaR";

  • specs, a list, each component corresponds to a different stress and contains k, alpha and q.

See SWIM for details.

Details

Convert a SWIMw object into a SWIM object

Examples

Run this code
# NOT RUN {
set.seed(0)
x <- as.data.frame(cbind(
  "normal" = rnorm(1000),
  "gamma" = rgamma(1000, shape = 2)))
res1 <- stress_wass(type = "RM", x = x,
  alpha = 0.9, q_ratio = 1.05)
convert_SWIMw_to_SWIM(res1)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab