Sample from the ERE model with given row and column sums

Share:

Description

Samples from the Erdos Reny model with Exponential weights and known marginals. Runs a Gibbs sampler to do this. A starting liabilities is generated via getfeasibleMatr before steps_ERE is called.

Usage

1
sample_ERE(l, a, p, lambda, nsamples = 10000, thin = 1000, burnin = 10000)

Arguments

l

vector of interbank libabilities

a

vector of interbank assets

p

probability of existence of a link (either a numerical value or a matrix). A single numerical value is converted into a matrix with 0s on the diagonal.

lambda

instensity parameters - either a numerical value or a matrix with positive entries)

nsamples

Number of samples to return.

thin

Frequency at which samples should be generated (default=1, every step)

burnin

Number of initial steps to discard.

Value

List of simulation results

Examples

1
2
3
4
l <- c(1,2.5,3)
a <- c(0.7,2.7,3.1)
L <- sample_ERE(l,a,p=0.5,lambda=0.25,nsamples=5,thin=20,burnin=10)
L

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.