posterior_samples {BBcor}R Documentation

Extract Posterior Samples

Description

Extract Posterior Samples

Usage

posterior_samples(object, summary = TRUE, cred = 0.95, ...)

Arguments

object

An object of class bbcor

summary

Logical. Should the posterior samples be summarized (defaults to TRUE)?

cred

Numeric. If summary = TRUE, the desired credible interval.

...

Currently ignored

Value

Either a data frame summarizing the relations (summary = TRUE) or a data frame including the posterior samples (summary = FALSE)

Examples


Y <- mtcars[,1:5]

bb_samps <- bbcor(Y, method = "spearman")

# correlations
posterior_samples(bb_samps)


# partial correlations
posterior_samples(cor_2_pcor(bb_samps))

[Package BBcor version 1.0.1 Index]