BGGMSampler: Bayesian Gaussian Graphical Model Sampler

Description Usage Arguments Value Author(s)

View source: R/BGGMSampler.R

Description

This function generates nmcmc MCMC samples for a Bayesian Gaussian Graphical Model following the exchange method proposed by Wang and Li, in Efficient Gaussian graphical Model determination under G-Wishart prior distributions.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
BGGMSampler(
  n,
  S,
  C,
  beta = 0.5,
  bPrior = 3,
  DPrior = diag(ncol(C)),
  burnin = 0,
  nmcmc = 1,
  method = "DMH"
)

Arguments

n

Number of observations.

S

Sample Covariance multiplied by n.

C

Initial Precision Matrix for the MCMC.

beta

Prior probability for each edge.

bPrior

Prior dedrees of freedom. Defaults to 3.

DPrior

Prior location SPD Matrix. Defaults to the identity matrix.

burnin

Number of sample to burn in in the MCMC.

nmcmc

Number of MCMC samples desired as output. That is without considering the burn-in period.

method

Either 'E' for Exchange or 'DMH' for Double Metropolis Hastings. By default is set to 'DMH'.

Value

List containg two arrays. One for the Precison matrices and another one for the adjacency matrices.

samC

An Array of Precicion matrices, in which the last dimesion goes through every Precision matrix.

samE

An Array of Adjacency matrices, in which the last dimesion goes through every adjacency matrix.

Author(s)

Rene Gutierrez Marquez


Rene-Gutierrez/BayTenGraMod documentation built on Dec. 12, 2020, 11:24 a.m.