Usage
bdgraph(data, n = NULL, meanzero = FALSE, model = NULL, iter = 5000,
burnin = floor(iter / 2), skip = 1, birthrate = NULL, prior.g = "Uniform",
b = 3, D = NULL, start.g = "full", MCiter = 10, summary = FALSE,
trace = TRUE, save.all = FALSE, last.objects = NULL)
Arguments
data
it could be a matrix or a data.frame of the data ( $n \times p$) or it could be a
covariance matrix as $S=x'x$ which $x$ is the data.
n
the number of observations.
meanzero
logical: if TRUE that means the data have zero mean; if FALSE (default) the mean of the data should not be zero.
model
a character with two options "high" and "low" to determine a type of BD-MCMC algorithm. Option "high" is for a
high-dimensional graphs (roughly graph with more than 8 nodes) and option "low" is for a low-dimensional graphs.
For more ditails see referen
iter
the number of iterations for the BD-MCMC algorithm.
burnin
the number of burn-in iterations for the BD-MCMC algorithm.
skip
it is the option for regularly saving part of the iterations. Default is 1 (for saving all iterations).
birthrate
the birth rates for the birth-death process.
prior.g
a character for selecting a prior distribution for the graph. It can be either "Uniform" (default) or "Poisson".
"Uniform" means discrete uniform distribution for prior distribution of the graph
($G \sim DU(\mathcal{G})$ in which $\mathcal{G}$ is all p
b
the degree of freedom for G-Wishart distribution, $W_G(b,D)$. G-Wishart distribution is the prior
distribution of precision matrix.
D
the positive definite matrix for G-Wishart distribution, $W_G(b,D)$. G-Wishart distribution is the prior
distribution of precision matrix.
start.g
it shows the starting graph for BD-MCMC algorithm. It is an upper triangular matrix in which
$g_{ij}=1$ if there is a link between nodes $i$ and $j$, otherwise $g_{ij}=0$.
It can be either "full" (default) or "empty" or "glasso". "full" means we start
MCiter
the number of iterations for Monte Carlo approximation of normalizing constant in G-Wishart distribution.
We need it only when number of nodes in the graph is less than 8.
summary
logical: if TRUE you will see the summary result of BD-MCMC algorithm; if FALSE (default), the output will be a
list as below.
trace
logical: if trace = TRUE, tracing number of iterations in BD-MCMC algorithm printing is abled. The default value is TRUE.
save.all
logical: if save.all = FALSE, we save the matrix A after burn-in iteration. The default value is FALSE. If save.all = FALSE,
we save all matrix A from starting point of iteration.
last.objects
If you would like to run the BD-MCMC algorithm for several times, with this obtion you can run the bdgraph from last
object of previous run.