ERE_step_cycle: Does one Gibbs Step on a cycle

Description Usage Arguments Value Examples

View source: R/RcppExports.R

Description

Execute one Gibbs step on a cycle keeping row and column sums fixed

Usage

1
ERE_step_cycle(r, c, L, lambda, p, eps = 1e-10)

Arguments

r

Row indies of cycle, starting at 0 (vector of length k)

c

Column indices of cycle, starting at 0 (vector of length k)

L

nxn matrix with nonnegative values (will be modified)

lambda

nxn matrix of intensities

p

nxn matrix of probabilities (must be in [0,1] and 0 on diagonal)

eps

Threshold for values to be interpreted as equal to 0 (default = 1e-10)

Value

no return value

Examples

1
2
3
4
5
6
L=matrix(rexp(9),nrow=3)
lambda <- matrix(0.5,nrow=3,ncol=3)
p <- matrix(0.7, nrow=3,ncol=3)
ERE_step_cycle(r=c(0,1),c=c(1,2),L=L,lambda=lambda,p=p)
ERE_step_cycle(r=c(0,1,2),c=c(0,1,2),L=L,lambda=lambda,p=p)
ERE_step_cycle(r=c(0,1,2),c=c(2,1,0),L=L,lambda=lambda,p=p)

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