pcor_mat: Extract the Partial Correlation Matrix

Description Usage Arguments Value Examples

View source: R/pcor_mat.R

Description

Extract the partial correlation matrix (posterior mean) from estimate, explore, ggm_compare_estimate, and ggm_compare_explore objects. It is also possible to extract the partial correlation differences for ggm_compare_estimate and ggm_compare_explore objects.

Usage

1
pcor_mat(object, difference = FALSE, ...)

Arguments

object

A model estimated with BGGM. All classes are supported, assuming there is matrix to be extracted.

difference

Logical. Should the difference be returned (defaults to FALSE) ? Note that this assumes there is a difference (e.g., an object of class ggm_compare_estimate) and ignored otherwise.

...

Currently ignored.

Value

The estimated partial correlation matrix.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# note: iter = 250 for demonstrative purposes

# data
Y <- ptsd[,1:5] + 1

# ordinal
fit <- estimate(Y, type = "ordinal",
                iter = 250,
                progress = FALSE)

pcor_mat(fit)

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