summary.SWIM: Summarising Stressed Models

Description Usage Arguments Value Functions Author(s) See Also Examples

View source: R/summary.R

Description

This function is a methods for an object of class SWIM or SWIMw. Provides summary statistics of the stochastic model, stressed using the scenario weights.

Usage

1
2
3
4
5
## S3 method for class 'SWIM'
summary(object, ..., xCol = "all", wCol = "all", base = FALSE)

## S3 method for class 'SWIMw'
summary(object, ..., xCol = "all", wCol = "all", base = FALSE)

Arguments

object

A SWIM or SWIMw object.

...

Additional arguments will be ignored.

xCol

Numeric or character vector, (names of) the columns of the underlying data of the object (default = "all").

wCol

Vector, the columns of the scenario weights of the object corresponding to different stresses (default = "all").

base

Logical, if TRUE, statistics under the baseline are also returned (default = "FALSE").

Value

summary.SWIM returns a list with components corresponding to different stresses. Components contain a summary statistic of each column of the data of the SWIM object:

mean The sample mean.
sd The sample standard deviation.
skewness The sample skewness.
ex kurtosis The sample excess kurtosis
1st Qu. The 25% quantile.
Median The median, 50% quantile.
3rd Qu. The 75% quantile.

Functions

Author(s)

Silvana M. Pesenti

Zhuomin Mao

See Also

summary, SWIM

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
     
## Example with the Relative Entropy
## continuing example in stress_VaR 
set.seed(0)
x <- as.data.frame(cbind(
  "normal" = rnorm(1000), 
  "gamma" = rgamma(1000, shape = 2)))
  
res1 <- stress(type = "VaR", x = x, 
  alpha = 0.9, q_ratio = 1.05)
summary(res1, xCol = "normal", base = TRUE) 


     
## Example with the Wasserstein distance 
## Not run: 
resW <- stress_wass(type = "RM", x = x, 
alpha = 0.9, q_ratio = 1.05)
summary(resW, xCol = "normal", base = TRUE) 

## End(Not run)

spesenti/SWIM documentation built on Jan. 15, 2022, 11:19 a.m.