Learn R Programming

BGGM (version 1.0.0)

ggm_compare_estimate.default: Compare Edges (Partial Correlations) Between GGMs with the Posterior Distribution

Description

Compare edges (partial correlations) that are estimated from groups to, say, detect differences or equivalences.

Usage

# S3 method for default
ggm_compare_estimate(..., iter = 5000)

Arguments

...

data matrices. Requires at least two.

iter

number of posterior samples

Value

A list of class ggm_compare_estimate containing:

  • pcor_diffs partial correlation differences (posterior distribution)

  • p number of variable

  • info list containing information about each group (e.g., sample size, etc.)

  • iter number of posterior samples

  • call match.call

See Also

select.ggm_compare_estimate

Examples

Run this code
# NOT RUN {
# data
Y1 <- BGGM::bfi[1:500,1:5]
Y2 <- BGGM::bfi[501:1000, 1:5]

# fit model
fit <- ggm_compare_estimate(Y1, Y2)

# posterior summary of differences
summary(fit)

# select (threshold) with credible intervals
sel <- select(fit)

# summary
summary(sel)

# selected differences
sel$mat_pcor

# adjacency matrix
sel$mat_adj
# }

Run the code above in your browser using DataLab