View source: R/select.ggm_compare_bf.R
select.ggm_compare_explore | R Documentation |
ggm_compare_explore
ObjectsProvides the selected graph (of differences) based on the Bayes factor \insertCitewilliams2020comparingBGGM.
## S3 method for class 'ggm_compare_explore'
select(object, BF_cut = 3, ...)
object |
An object of class |
BF_cut |
Numeric. Threshold for including an edge (defaults to 3). |
... |
Currently ignored. |
The returned object of class select.ggm_compare_explore
contains
a lot of information that is used for printing and plotting the results.
For users of BGGM, the following are the useful objects:
adj_10
Adjacency matrix for which there was evidence for a difference.
adj_10
Adjacency matrix for which there was evidence for a null relation
pcor_mat_10
Selected partial correlation matrix (weighted adjacency; only for two groups).
explore
and ggm_compare_explore
for several examples.
##################
### example 1: ###
##################
# data
Y <- bfi
# males and females
Ymale <- subset(Y, gender == 1,
select = -c(gender,
education))[,1:10]
Yfemale <- subset(Y, gender == 2,
select = -c(gender,
education))[,1:10]
# fit model
fit <- ggm_compare_explore(Ymale, Yfemale,
iter = 250,
type = "continuous",
progress = FALSE)
E <- select(fit, post_prob = 0.50)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.