donaldRwilliams / BGGM

Bayesian Gaussian Graphical Models
https://donaldrwilliams.github.io/BGGM/
GNU General Public License v2.0
54 stars 14 forks source link

Using BGGM::select in combination with BGGM::explore gives par cors above 1 #93

Closed KarolineHuth closed 5 months ago

KarolineHuth commented 5 months ago

The following code will give partial correlations above one. I cannot share the code publicly but will share it via email with Phillipe.

The issue lies in the select function. the explore function will give partial correlations between -1 and 1 as expected.

data <- readRDS("N0648_1_cleaned.rds")

fit <- BGGM::explore(data, type = "continuous", prior_sd = .5, seed = NULL)
out <- summary(fit)
max(out$dat_results$Post.mean)
# not above one

out_select <- BGGM::select(fit)
max(out_select$pcor_mat)
# Above 1
ph-rast commented 5 months ago

Looks like this commit did the trick - I'm closing this issue