# \donttest{
# Assume perfect prior information
# synthetic ggm
p <- 20
main <- gen_net()
# prior odds 10:1, assuming graph is known
prior_ggm <- ifelse(main$adj == 1, 10, 1)
# generate data
y <- MASS::mvrnorm(n = 200,
mu = rep(0, 20),
Sigma = main$cors)
# prior est
prior_est <- prior_belief_ggm(Y = y,
prior_ggm = prior_ggm,
progress = FALSE)
# check scores
BGGM:::performance(Estimate = prior_est$adj,
True = main$adj)
# default in BGGM
default_est <- select(explore(y, progress = FALSE))
# check scores
BGGM:::performance(Estimate = default_est$Adj_10,
True = main$adj)
# }
Run the code above in your browser using DataLab