findFeasibleMatrix_targetmean {systemicrisk} | R Documentation |
Creates a feasible starting matrix with a desired mean average degree
Description
This extension of findFeasibleMatrix
attempts to
create a feasible matrix where a certain proportion of the entries
is positive. There is no guarantee that this proportion is
achieved. If it is not possible then this matrix will report a warning
and simply return the matrix constructed by findFeasibleMatrix.
Usage
findFeasibleMatrix_targetmean(r, c, p, eps = 1e-09, targetmean = 0.3)
Arguments
r |
vector of row sums (nonnegative |
c |
vector of column sums (nonnegative) |
p |
matrix of probabilities (must be in [0,1]), matching the dimensions of r and c. Values of p=0 are interpreted that the corresponding matrix elements have to be 0. Note: p=1 does not force the corresponding matrix element to exist. |
eps |
row and col sums can at most be different by eps. Default 1e-9. |
targetmean |
Average proportion of positive entries of the resulting matrix. Defaults to 0.3 |
Value
A feasible matrix.