summary.ggm_compare_estimate: Summary method for 'ggm_compare_estimate' objects

Description Usage Arguments Value See Also Examples

View source: R/ggm_compare_estimate.default.R

Description

Summarize the posterior distribution of each partial correlation difference with the posterior mean and standard deviation.

Usage

1
2
## S3 method for class 'ggm_compare_estimate'
summary(object, col_names = TRUE, cred = 0.95, ...)

Arguments

object

An object of class ggm_compare_estimate.

col_names

Logical. Should the summary include the column names (default is TRUE)? Setting to FALSE includes the column numbers (e.g., 1--2).

cred

Numeric. The credible interval width for summarizing the posterior distributions (defaults to 0.95; must be between 0 and 1).

...

Currently ignored.

Value

A list containing the summarized posterior distributions.

See Also

ggm_compare_estimate

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
# note: iter = 250 for demonstrative purposes
# data
Y <- bfi

# males and females
Ymale <- subset(Y, gender == 1,
                select = -c(gender,
                            education))[,1:5]

Yfemale <- subset(Y, gender == 2,
                  select = -c(gender,
                              education))[,1:5]

# fit model
fit <- ggm_compare_estimate(Ymale,  Yfemale,
                            type = "ordinal",
                            iter = 250,
                            prior_sd = 0.25,
                            progress = FALSE)

summary(fit)

BGGM documentation built on Dec. 3, 2020, 9:07 a.m.