Generate p-dimensional matrices so that its inverse is dense. The matrix will be generated so its first 'num' eigen values are 1000 and the remaining are 1. The orthogonal basis is generated via QR decomposition of

denseQR(p = 8, num = 5, n = NULL)

Arguments

p

desired dimension

num

number of 'large' eigen values. Note num must be less than p

n

option to generate n observations from covariance matrix S

Value

Omega, S

Examples

# generate denseQR matrix with p = 5 denseQR(p = 5)
#> $Omega #> [,1] [,2] [,3] [,4] [,5] #> [1,] 1.000000e-03 -5.684342e-20 -5.684342e-20 -2.842171e-20 8.526513e-20 #> [2,] -5.684342e-20 1.000000e-03 5.684342e-20 -2.842171e-20 1.421085e-20 #> [3,] -5.684342e-20 1.136868e-19 1.000000e-03 4.263256e-20 -4.263256e-20 #> [4,] -8.526513e-20 -5.684342e-20 4.263256e-20 1.000000e-03 -7.105427e-21 #> [5,] 5.684342e-20 -4.263256e-20 -1.421085e-20 -7.105427e-21 1.000000e-03 #> #> $S #> [,1] [,2] [,3] [,4] [,5] #> [1,] 1.000000e+03 5.684342e-14 5.684342e-14 2.842171e-14 -8.526513e-14 #> [2,] 5.684342e-14 1.000000e+03 -5.684342e-14 2.842171e-14 -1.421085e-14 #> [3,] 5.684342e-14 -1.136868e-13 1.000000e+03 -4.263256e-14 4.263256e-14 #> [4,] 8.526513e-14 5.684342e-14 -4.263256e-14 1.000000e+03 7.105427e-15 #> [5,] -5.684342e-14 4.263256e-14 1.421085e-14 7.105427e-15 1.000000e+03 #>