# NOT RUN {
## Cholesky sampling via Metropolis-Hastings
# Generate a full matrix (default behaviour)
chol_mh()
# Generate a matrix with a percentage of zeros
chol_mh(d = 0.5)
# Generate a random acyclic digraph structure
dag <- rgraph(p = 3, d = 0.5, dag = TRUE)
igraph::print.igraph(dag)
# Generate a matrix complying with the predefined zero pattern
chol_mh(dag = dag)
## Cholesky sampling via i.i.d. Cholesky factor
# Generate a full matrix (default behaviour)
chol_iid()
# Generate a matrix with a percentage of zeros
chol_iid(d = 0.5)
# Generate a matrix complying with the predefined zero pattern
igraph::print.igraph(dag)
chol_iid(dag = dag)
# }
Run the code above in your browser using DataLab