select.ggm_compare_estimate: Graph Selection for 'ggm_compare_estimate' Objects

Description Usage Arguments Value Examples

View source: R/select.ggm_compare_estimate.R

Description

Provides the selected graph (of differences) based on credible intervals for the partial correlations that did not contain zero \insertCiteWilliams2019BGGM.

Usage

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

Arguments

object

An object of class estimate.default.

cred

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

...

not currently used

Value

The returned object of class select.ggm_compare_estimate contains a lot of information that is used for printing and plotting the results. For users of BGGM, the following are the useful objects:

Examples

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

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

Yfemale <- subset(Y, gender == 2,
                  select = -c(gender,
                              education))

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


E <- select(fit)

BGGM documentation built on Aug. 20, 2021, 5:08 p.m.