f_plot_distrib_2D {atRisk}R Documentation

Plot of historical distributions in 2D

Description

This function allows to create a plot in 2D of historical distributions.

Usage

f_plot_distrib_2D(
  m_param_histo,
  type_function,
  v_date = NULL,
  v_var_dep,
  x_lab,
  y_lab,
  x_min = NULL,
  x_max = NULL,
  color_theme = c("#bd8e42", "gray30", "#876b3a", "khaki1")
)

Arguments

m_param_histo

Numeric matrix containing the parameters of the f_param_histo function

type_function

String argument specifying the distribution type (gaussian, skew-gaussian or skew-t)

v_date

Vector optional of dates containing the full sample's dates (default value : daily dates starting from "1970-01-01")

v_var_dep

Numeric vector containing the realization of the dependent variable

x_lab

String optional argument for the x axis title (default value = x)

y_lab

String optionalargument for the y axis title (default value = y)

x_min

Numeric optional argument (default value = VaR 97.5)

x_max

Numeric optional argument (default value = VaR 2.5)

color_theme

A character vector specifying the color theme to use (default value c("#bd8e42","gray30","#876b3a","khaki1"))

Value

A plot of historical distributions with the median, four quantiles (5th, 25th, 75th, 95th) and the realized dependent variable.

Examples

# Import data
data(data_US)
data(data_param_histo_US)

results_plot_2D <- f_plot_distrib_2D(m_param_histo=data_param_histo_US,
type_function="skew-t",
v_date=data_US[,1],
v_var_dep=data_US[,2],
x_lab="US GDP variation",
y_lab="Year")

[Package atRisk version 0.2.0 Index]