Extract edge inclusion probabilities from an ssjgl fit
extract_probabilities.RdExtract edge inclusion probabilities from an ssjgl fit
Value
A list with elements:
- prob1
p x p matrix of edge inclusion probabilities P(delta=1).
- prob2
p x p matrix of non-similarity probabilities P(xi=1), or NULL if not doubly spike-and-slab.
Examples
sim <- simulate_ssjgl_data(K = 2, p = 10, n = 50, seed = 1)
fit <- ssjgl(sim$data_list, penalty = "fused",
lambda0 = 1, lambda1 = 0.5, lambda2 = 0.5,
v0s = 0.01, maxitr.em = 10, impute = FALSE)
#> Ladder= 1 v0 = 0.01 done. Time: 0
probs <- extract_probabilities(fit)
# Edges with > 50% inclusion probability
sum(probs$prob1[upper.tri(probs$prob1)] > 0.5)
#> [1] 26