Simulate a quasi-symmetric matrix

rquasisymmetric(n, lambda = 10, density = 1, dimnames = list(cited =
  paste0("P", 1:n), citing = paste0("P", 1:n)))

Arguments

n

the dimension of the matrix

lambda

the mean of the underlying Poisson random number generator

density

the density (i.e. proportion of non-zeroes) of the symmetric component

dimnames

names of the matrix dimensions, as a list

Value

A sparse, quasi-symmetric matrix of dimension n by n.

Examples

rquasisymmetric(5)
#> 5 x 5 sparse Matrix of class "dgCMatrix" #> citing #> cited P1 P2 P3 P4 P5 #> P1 0.57729676 0.16994553 0.39649853 0.27615221 0.07063617 #> P2 0.16314395 0.24637831 0.10202464 0.45387081 0.10105627 #> P3 0.85739180 0.22981671 0.59102054 0.75103391 0.06240944 #> P4 0.40853216 0.69943724 0.51380643 0.49437050 0.15489040 #> P5 0.06669748 0.09939952 0.02725178 0.09886191 0.62820345