Learn R Programming

BGGM (version 1.0.0)

estimate: GGMs with Credible Intervals or the Region of Practical Equivalence

Description

Estimate the conditional (in)dependence structure with credible intervals or the region of practical equivalence. For the former, there is an analytic solution available, whereas for the latter, samples are efficiently drawn from the posterior distribution.

Usage

estimate(Y, iter = 5000, analytic = FALSE, ...)

Arguments

Y

data matrix (n by p).

iter

number of posterior samples

analytic

analytic solution. see notes for further details.

...

not used

Value

list of class estimate:

analytic = TRUE:

  • fit list of analytic solution estimates

    • inv_mu inverse covariance matrix (mean)

    • inv_var inverse covariance matrix (variance)

    • partial partial correlation matrix

  • analytic TRUE

  • call match.call()

  • dat data matrix

  • p number of variables

analytic = FALSE:

  • parcors_mat partial correlation matrix

  • inv_mat inverse covariance matrix

  • posterior samples posterior samples for partial correlations and inverse covariance matrix

  • p number of variables

  • dat data matrix

  • iter number of posterior samples

  • call match.call()

  • analytic FALSE

Examples

Run this code
# NOT RUN {
# p = 20
Y <- BGGM::bfi[, 1:5]

# analytic approach (sample by setting analytic = FALSE)
fit_analytic <- estimate(Y, analytic = TRUE)

# select the graph (edge set E)
E <- select(fit_analytic, ci_width = 0.95)

# }

Run the code above in your browser using DataLab