Description Usage Arguments Value Examples

View source: R/lib_ErdosRenyExponential_MCMC.R

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.

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

`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. |

List of simulation results

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
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.