Learn R Programming

BGGM (version 1.0.0)

select.ggm_compare_bf: Select Graphical Structure with the Bayes Factor

Description

Compare GGMs with the Bayes factor. This method allows for assessing (relative) evidence for edge equality or edges differences across any number of groups. Further, confirmatory hypothesis testing can be used to test predictions or expectations regarding difference or similarities in different groups (e.g., male vs. female).

Usage

# S3 method for ggm_compare_bf
select(object, BF_cut = 3, ...)

Arguments

object

object of class ggm_compare_bf

BF_cut

evidentiary threshold

...

currently ignored

Value

list of class select.ggm_compare_bf

  • BF_10 Bayes factors for the alternative ("not equal")

  • BF_01 Bayes factors for the null hypothesis

  • BF_10_adj Bayes factor adjacency matrix for the alternative ("not equal")

  • BF_01_adj Bayes factor adjacency matrix for the null hypothesis

  • adj_10 adjacency matrix for the selected edges (in favor of the "not equal")

  • adj_01 adjacency matrix for the selected edges (in favor of the null hypothesis)

  • pcor_mat_10 partial correlation matrix for the alternative ("not equal")

Examples

Run this code
# NOT RUN {
Y1 <- MASS::mvrnorm(500, rep(0, 16), Sigma = diag(16))
Y2 <- MASS::mvrnorm(500, rep(0, 16), Sigma = diag(16))
Y3 <- MASS::mvrnorm(500, rep(0, 16), Sigma = diag(16))

ggm_bf <- ggm_compare_bf(Y1, Y2, Y3,
                        prior_sd = .20,
                        iter = 500,
                        cores = 2)
# select with BF_cut = 3
ggm_bf_sel <- select(ggm_bf, BF_cut = 3)

# summary
summary(ggm_bf_sel)
# }

Run the code above in your browser using DataLab