Amostragem exata da matriz de precisão

Seminários II

adj <- matrix( c( 0, 0, 1, 0, 0, 0, 1, 0, 0 ), 3, 3 );adj
##      [,1] [,2] [,3]
## [1,]    0    0    1
## [2,]    0    0    0
## [3,]    1    0    0
sample <- rgwish( n = 1, adj = adj, b = 3, D = diag( 3 ) )
round( sample, 2 )
##      [,1] [,2] [,3]
## [1,] 3.64 0.00 0.45
## [2,] 0.00 1.65 0.00
## [3,] 0.45 0.00 2.96