Learn R Programming

⚠️There's a newer version (0.4.2) of this package.Take me there.

systemicrisk (version 0.4)

A Toolbox for Systemic Risk

Description

A toolbox for systemic risk based on liabilities matrices. Contains a Gibbs sampler for liabilities matrices where only row and column sums of the liabilities matrix as well as some other fixed entries are observed. Includes models for power law distribution on the degree distribution.

Copy Link

Version

Install

install.packages('systemicrisk')

Monthly Downloads

599

Version

0.4

License

GPL-3

Maintainer

Axel Gandy

Last Published

January 8th, 2017

Functions in systemicrisk (0.4)

calibrate_ER

Calibrate ER model to a given density
ERE_step_cycle

Does one Gibbs Step on a cycle
default_cascade

Default Cascade
choosethin

Calibrate Thinning
findFeasibleMatrix_targetmean

Creates a feasible starting matrix with a desired mean average degree
calibrate_FitnessEmp

Calibrate empirical fitness model to a given density
default_clearing

Clearing Vector with Bankruptcy Costs
cloneMatrix

Crates a deep copy of a matrix
genL

Generate Liabilities Matrix from Prior
findFeasibleMatrix

Finds a Nonnegative Matrix Satisfying Row and Column Sums
GibbsSteps_kcycle

Gibbs sampling step of a matrix in the ERE model
getfeasibleMatr

Creates a feasible starting matrix
Model.lambda.constant

Model for a Constant lambda
Model.fitness.genlambdaparprior

Prior distribution for eta and zeta in the fitness model
Model.Indep.p.lambda

Combination of Independent Models for p and lambda
Model.fitness.meandegree

Mean out-degree of a random node the fitness model
steps_ERE

Perform Steps of the Gibbs Sampler of the ERE model
Model.lambda.GammaPrior

Model with Gamma Prior on Lambda
Model.lambda.Gammaprior_mult

Model Using Multiple Independent Components
Model.p.constant

Model for a Constant p
Model.p.Fitness.Servedio

Multiplicative Fitness Model for Power Law
default

Default of Banks
Model.fitness.conditionalmeandegree

Mean out-degree of a node with given fitness in the fitness model
diagnose

Outputs Effective Sample Size Diagonis for MCMC run
sample_ERE

Sample from the ERE model with given row and column sums
Model.additivelink.exponential.fitness

Fitness model for liabilities matrix
sample_HierarchicalModel

Sample from Hierarchical Model with given Row and Column Sums
Model.p.Betaprior_mult

Model Using Multiple Independent Components
Model.p.BetaPrior

Model for a Random One-dimensional p