| matrix_estimation {NetworkRiskMeasures} | R Documentation | 
Matrix Estimation
Description
Methods for estimating matrix entries from the marginals (row and column sums).
There are currently two methods implemented: Maximum Entropy (Upper 2004) and Minimum Density (Anand et al. 2015).
You may use the matrix_estimation() function, setting the desired method.
Or you may use directly the max_ent() function for maximum entropy estimation 
or the min_dens() function for minimum density estimation.
Usage
matrix_estimation(
  rowsums,
  colsums,
  method = c("me", "md"),
  ...,
  max.it = 1e+05,
  abs.tol = 0.001,
  verbose = TRUE
)
max_ent(rowsums, colsums, max.it = 1e+05, abs.tol = 0.001, verbose = TRUE)
min_dens(
  rowsums,
  colsums,
  c = 1,
  lambda = 1,
  k = 100,
  alpha = 1/sum(rowsums),
  delta = 1/sum(rowsums),
  theta = 1,
  remove.prob = 0.01,
  max.it = 1e+05,
  abs.tol = 0.001,
  verbose = TRUE
)
Arguments
| rowsums | a numeric vector with the row sums. | 
| colsums | a numeric vector with the column sums. | 
| method | the matrix estimation method. Choose  | 
| ... | further arguments passed to or from other methods. | 
| max.it | the maximum number of iterations. | 
| abs.tol | the desired accuracy. | 
| verbose | gives verbose output. Default is  | 
| c | the 'cost' an extra link for the minimum density estimation. See Anand et al. (2015). | 
| lambda | you should use  | 
| k | you should use  | 
| alpha | weights for the row sums deviations. See Anand et al. (2015). | 
| delta | weights for the column sums deviations. See Anand et al. (2015). | 
| theta | scaling parameter. Emphasizes the weight placed on finding solutions with similar characteristics to the prior matrix. See Anand et al. (2015). | 
| remove.prob | probability to randomly remove a link during the algorithm. See Anand et al. (2015). | 
Value
The functions return the estimated matrix.
References
Upper, C. and A. Worm (2004). Estimating bilateral exposures in the German interbank market: Is there a danger of contagion? European Economic Review 48, 827-849.
Anand, K., Craig, B. and G. von Peter (2015). Filling in the blanks: network structure and interbank contagion. Quantitative Finance 15:4, 625-636.
Examples
# Example from Anand, Craig and Von Peter (2015, p.628)
# Liabilities
L <- c(a = 4, b = 5, c = 5, d = 0, e = 0, f = 2, g = 4)
# Assets
A <- c(a = 7, b = 5, c = 3, d = 1, e = 3, f = 0, g = 1)
# Maximum Entropy
ME <- matrix_estimation(A, L, method = "me")
ME <- round(ME, 2)
# Minimum Density
set.seed(192)
MD <- matrix_estimation(A, L, method = "md")