Usage
bdgraph(data, n = NULL, npn = "normal", mean = NULL, method = NULL,
g.prior = "Uniform", iter = 5000, b = 3, burnin = floor(iter / 2),
thin = 1, lambda = NULL, D = NULL, g.start = "full", K.start = NULL,
mc = 10, trace = TRUE, save.all = FALSE)
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 matrix.
n
the number of observations. We need it if the "data" is a covariance matrix.
npn
a character with four options "normal" (default), "shrinkage", "truncation", and "skeptic". Option "normal" means data
are coming from multivariate normal distribution. Option "shrinkage" is for the shrunken transformation, option
"truncation" is for
mean
If $mean = 0$ means the data have zero mean, otherwise the mean of the data should not be zero.
method
a character with two options "fast" and "mc" to determine a type of BD-MCMC algorithm. Option "fast" is for a
high-dimensional graphs (roughly graph with more than 8 nodes which is the default) and option "mc" is based on Monte Carlo
approximation for
g.prior
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
iter
the number of iteration for the BD-MCMC algorithm.
b
the degree of freedom for G-Wishart distribution, $W_G(b,D)$. G-Wishart distribution is the prior
distribution of precision matrix.
burnin
the number of burn-in iteration for the BD-MCMC algorithm.
thin
option for regularly saving part of the iteration. Default is 1 (for saving all iteration).
lambda
a rate for prior distribution of graph when $degree(G) \sim TP(\lambda).$
D
the positive definite matrix for G-Wishart distribution, $W_G(b,D)$. G-Wishart distribution is the prior
distribution of precision matrix.
g.start
it shows the initial graph for the algorithm. It can be either "full" (default), "empty", "glasso", "mb", or "ct".
"full" means the initial graph is a full graph and "empty" means a empty graph. "glasso" means
the initial graph is a suggested graph by
K.start
it is a starting point for precision matrix. It has to be the positive definite matrix.
mc
the number of iteration 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.
trace
logical: if TRUE (default), prints out algorithm progress.
save.all
logical: if FALSE (default), we save the adjacency matrices after burn-in. If TRUE, we save all matrices from
starting point.