Generate p-dimensional matrices so that its inverse is dense.

dense(p = 8, base = 0.9, n = NULL)

Arguments

p

desired dimension

base

base multiplier

n

option to generate n observations from covariance matrix S

Value

Omega, S

Examples

# generate dense matrix with p = 5 dense(p = 5)
#> $Omega #> [,1] [,2] [,3] [,4] [,5] #> [1,] 8.043478 -1.956522 -1.956522 -1.956522 -1.956522 #> [2,] -1.956522 8.043478 -1.956522 -1.956522 -1.956522 #> [3,] -1.956522 -1.956522 8.043478 -1.956522 -1.956522 #> [4,] -1.956522 -1.956522 -1.956522 8.043478 -1.956522 #> [5,] -1.956522 -1.956522 -1.956522 -1.956522 8.043478 #> #> $S #> [,1] [,2] [,3] [,4] [,5] #> [1,] 1.0 0.9 0.9 0.9 0.9 #> [2,] 0.9 1.0 0.9 0.9 0.9 #> [3,] 0.9 0.9 1.0 0.9 0.9 #> [4,] 0.9 0.9 0.9 1.0 0.9 #> [5,] 0.9 0.9 0.9 0.9 1.0 #>