Learn R Programming

BGGM (version 1.0.0)

select.explore: Select Graphical Structure with the Bayes Factor

Description

This allows for not only estimating the conditional dependence structure, that is non-zero edges, but also the conditional independence structure (evidence for no relation).

Usage

# S3 method for explore
select(object, BF_cut = 3, alternative = "two.sided", ...)

Arguments

object

object of class explore.default

BF_cut

evidentiary threshold

alternative

type of hypothesis (see notes)

...

currently not used

Value

list of class select.explore:

alternative = "two.sided":

  • partials_non_zero selected partial correlation matrix

  • pcor_mat partial correlation matrix (non set to zero)

  • pcor_sd partial correlation standard deviations

  • Adj_10 adjacency matrix for the selected edges (in favor of the alternative)

  • Adj_01 adjacency matrix for the null hypothesis (conditional independence)

  • BF_10 Bayes factors for alternative

  • BF_01 Bayes factors for the null hypothesis

  • BF_cut evidentiary threshold

  • alternative "two.sided"

  • code match.call()

alternative = "greater":

  • partials_positive selected partial correlation matrix

  • pcor_mat partial correlation matrix (none set to zero)

  • pcor_sd partial correlation standard deviations

  • Adj_20 adjacency matrix for the selected edges (in favor of the alternative)

  • Adj_01 adjacency matrix for the null hypothesis (conditional independence)

  • BF_20 Bayes factors for alternative

  • BF_01 Bayes factors for the null hypothesis

  • BF_cut evidentiary threshold

  • alternative "greater"

  • code match.call()

alternative = "less":

  • partials_negative selected partial correlation matrix

  • pcor_mat partial correlation matrix (none set to zero)

  • pcor_sd partial correlation standard deviations

  • Adj_20 adjacency matrix for the selected edges (in favor of the alternative)

  • Adj_01 adjacency matrix for the null hypothesis (conditional independence)

  • BF_20 Bayes factors for alternative

  • BF_01 Bayes factors for the null hypothesis

  • BF_cut evidentiary threshold

  • alternative "less"

  • code match.call()

alternative = "exhaustive"

  • post_prob data.frame with posterior probabilities for each edge

  • neg_mat adjacency matrix for negative edges

  • post_mat adjacency matrix for positive edges

  • null_mat adjacency matrix for zero (conditional independence)

  • "alternative" "exhaustive"

  • pcor_mat partial correlation matrix (non set to zero)

  • pcor_sd partial correlation standard deviations

  • code match.call()

  • prob hyp_prob

Examples

Run this code
# NOT RUN {
# p = 10
Y <- BGGM::bfi[,1:10]

# sample posterior
fit <- explore(Y, iter = 5000)

# select E
E <- select(fit, BF_cut = 3)

# summarize
summary(E)

# non-zero edges
E$partials_non_zero

# adjacency matrix
E$Adj_10

# null adjacency matrix
E$Adj_01
# }

Run the code above in your browser using DataLab