Model.additivelink.exponential.fitness: Fitness model for liabilities matrix

Description Usage Arguments Value Examples

View source: R/ExponentialFitnessLinkFun.R

Description

Assumes a diagonal consisting of 0s.

Usage

1
2
Model.additivelink.exponential.fitness(n, alpha, beta, gamma = 1, lambdaprior,
  sdpropfitness = 1/sqrt(n))

Arguments

n

Number of nodes in the model.

alpha

Exponent of the power law of the degree distribution. Must be <0.

beta

Lower endpoint of the relative expected out degree (expected out degree divided by n-1). Must be >=0.

gamma

Upper endpoint of the relative expected out degree (expected out degree divided by n-1). Must be at least beta and at most 1.

lambdaprior

Prior on zeta and eta. For the type of object required see Model.fitness.genlambdaparprior.

sdpropfitness

Standard deviation for the log-normally distributed multiplicative proposals for Metropoli-Hastings updates of the fitness. Defaults to 1/sqrt{n}.

Value

A model to be used by sample_HierarchicalModel. This is a list of functions. It includes a function accrates() that repors acceptance rates for the Metropolis-Hasting steps involved.

Examples

1
2
3
4
5
6
7
8
9
mod <- Model.additivelink.exponential.fitness(10,alpha=-2.5,beta=0.1,
                lambdaprior=Model.fitness.genlambdaparprior(ratescale=1e3))
theta <- mod$rtheta()
L <- genL(mod)
l <- rowSums(L$L)
a <- colSums(L$L)
## increase number of samples and thinning in real examples
res <- sample_HierarchicalModel(l=l,a=a,model=mod,nsamples=4,thin=50)
mod$accrates()

systemicrisk documentation built on May 2, 2019, 9:26 a.m.