https://github.com/cran/BDgraph
Raw File
Tip revision: cd87b39c001bb81ede2600bd7d1a32dece8ad4e6 authored by Abdolreza Mohammadi on 06 May 2013, 21:32:42 UTC
version 2.6
Tip revision: cd87b39
select.Rd
\name{select}
\alias{select}

\title{
 Selecting the best graphs
}
\description{
According to output of the BD-MCMC algorithm, this function gives us the graphs with the highest 
posterior probabilities.  
}
\usage{
select(output, plot = FALSE)
}

\arguments{
  \item{output}{
a list which is the result of the BD-MCMC algorithm from the 'bdgraph' function. 
}
  \item{plot}{
logical: if TRUE you will see the plot of best graph. The default is FALSE. 
}

}
\value{
\item{G}{ Adjacency matrix for the best graph (graph with the highest posterior probability).}
}
\references{
Mohammadi, A. and E. C. Wit (2012). Gaussian graphical model determination based on birth-death 
MCMC inference, arXiv:1210.5371v4. \url{http://arxiv.org/abs/1210.5371v4}
}
\author{
Abdolreza Mohammadi and Ernst Wit
}
\seealso{
\code{\link{bdgraph}}
}
\examples{
\dontrun{
  # generate the data from multivariate normal distribution
  data.sim <- bdgraph.sim(n = 100, p = 8, size = 10, vis = T)
  
  output <- bdgraph(data.sim, meanzero = T, iter = 2000)
  
  select(output)
  }
}
back to top