Generate a p-dimensional compound symmetric matrix.
compound(p = 8, n = NULL)
p | desired dimension |
---|---|
n | option to generate n observations from covariance matrix S |
Omega, S
# generate compound symmetric matrix with p = 5 compound(p = 5)#> $Omega #> [,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 #> #> $S #> [,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 #>