<?xml version="1.0" encoding="UTF-8"?>
<CRANTaskView>

  <name>gR</name>
  <topic>gRaphical Models in R</topic>
  <maintainer email="sorenh@math.aau.dk">Soren Hojsgaard</maintainer>
  <version>2016-02-26</version>

  <info>
  <p><a href="http://en.wikipedia.org/wiki/Graphical_model">Wikipedia</a>
  defines a graphical model as follows: <i>A graphical model is a
  probabilistic model for which a graph denotes the conditional
  independence structure between random variables. They are commonly
  used in probability theory, statistics - particularly Bayesian
  statistics and machine learning.</i>
  </p>

  A supplementary view is that graphical models are based on
  exploiting conditional independencies for constructing complex
  stochastic models with a modular structure. That is, a complex
  stochastic model is built up by simpler building blocks.


  This task view is a collection of packages intended to supply R code
  to deal with graphical models.

  <p>The packages can be roughly structured into the following topics
  (although several of them have functionalities which go across these categories):</p>

  <p><strong>Representation, manipulation and display of graphs</strong></p>
  <ul>

    <li>
      <pkg>diagram</pkg>
      Visualises simple graphs (networks) based on a transition matrix,
      utilities to plot flow diagrams, visualising webs, electrical
      networks, ...
    </li>

    <li>
      <pkg>dynamicGraph</pkg>
      Interactive graphical tool for manipulating graphs
    </li>

    <li>
      <pkg>giRaph</pkg>
      Supply classes and methods to represent and manipulate graphs
    </li>

    <li>
      <bioc>graph</bioc>
      A package that implements some simple graph handling capabilities.
    </li>

    <li>
      <pkg>gRbase</pkg>
      The gRbase package provides certain general constructs which are used
      by other graphical modelling packages. This includes 1) the
      concept of gmData (graphical meta data), 2) several graph
      algorithms 3) facilities for table operations, 4) functions for
      testing for conditional independence. gRbase also illustrates
      how hierarchical log-linear models (hllm) may be implemented.
    </li>

    <li>
      <pkg>igraph</pkg>
      Routines for simple graphs, network analysis.
    </li>

    <li>
      <pkg>mathgraph</pkg>
      Simple tools for constructing and manipulating objects of class
      mathgraph from the book "S Poetry", available at
      <a href="http://www.burns-stat.com/pages/spoetry.html">
	http://www.burns-stat.com/pages/spoetry.html
	</a>
    </li>

    <li>
      <pkg>network</pkg>
      Tools to create and modify network objects.  The network class can
      represent a range of relational data types, and supports arbitrary
      vertex/edge/graph attributes.
    </li>

    <li>
      <bioc>Rgraphviz</bioc>
      Provides plotting capabilities for R graph objects.
    </li>

    <li>
      <bioc>RBGL</bioc>
      A fairly extensive and comprehensive interface to the graph algorithms contained in the BOOST library.
      (based on graph
      objects from the <bioc>graph</bioc> package).
    </li>


  </ul>


  <p><strong>Classical models - General purpose packages</strong></p>
  <ul>

    <li>
      <pkg>ggm</pkg>
      Fitting graphical Gaussian models.
    </li>

    <li>
      <pkg>gRbase</pkg>
      The gRbase package provides certain general constructs
      which are used by other graphical modelling packages (in
      particular by <pkg>gRain</pkg>).
      This includes 1) the concept of gmData (graphical meta
      data), 2) several graph algorithms 3) facilities for
      table operations, 4) functions for testing for
      conditional independence. gRbase also illustrates how
      hierarchical log-linear models (hllm) may be
      implemented.
      Link: <a href="http://www.jstatsoft.org/v14/i17/">http://www.jstatsoft.org/v14/i17/</a>
    </li>

    <li>
      <pkg>gRim</pkg>
      Implements graphical interaction models for contingency tables
      (i.e. log-linear models) and graphical Gaussian models for the
      multivariate normal data (i.e. covariance selection models) and
      mixed interaction models.
    </li>

    <li>
      <pkg>gRapHD</pkg>
      Package for selecting and fitting high-dimensional graphical
      models for discrete, Gaussian, or mixed discrete and Gaussian
      data.
      Link: <a href="http://www.jstatsoft.org/v37/i01/">http://www.jstatsoft.org/v37/i01/</a>
    </li>

<!--    <li>
      <pkg>mimR</pkg>
      General package for model selection in contingency
      tables, graphical Gaussian models and mixed interaction
      models. The package provides an interface to the MIM
      program and only runs on Windows.
      Link: <a href="http://www.jstatsoft.org/v11/i06/">http://www.jstatsoft.org/v11/i06/</a>
    </li>
-->

  </ul>


  <p><strong>Miscellaneous: Model search, structure learning, specialized types of models etc.</strong></p>
  <ul>


    <li>
      <pkg>BDgraph</pkg> Bayesian Graph Selection Based on Birth-Death
      MCMC Approach. Bayesian inference for structure learning in
      undirected graphical models. The main target is to uncover
      complicated patterns in multivariate data wherein either
      continuous or discrete variables.
    </li>


    <li>
      <pkg>catnet</pkg>
      A package that handles discrete Bayesian network models and provides
      inference using the frequentist approach
    </li>


    <li>
      <pkg>FBFsearch</pkg>
			Algorithm for searching the space of Gaussian directed acyclic
			graphical models through moment fractional Bayes factors
    </li>


    <li>
      <pkg>GeneNet</pkg>
      Modeling and Inferring Gene Networks. GeneNet
      is a package for analyzing gene expression (time series) data with
      focus on the inference of gene networks.
    </li>

    <li>
      <pkg>huge</pkg> High-dimensional Undirected Graph Estimation.
    </li>



    <li>
      <pkg>parcor</pkg>
      The package estimates the matrix of partial correlations based on different regularized
      regression methods: lasso, adaptive lasso, PLS, and Ridge Regression. In addition, the package
      provides model selection for lasso, adaptive lasso and Ridge
      regression based on
      cross-validation.
    </li>

    <li>
      <pkg>gRc</pkg>
      Inference in graphical Gaussian models with edge and vertex
      symmetries (Graphical Gaussian models with colours).
      Link: <a href="http://www.jstatsoft.org/v23/i06/">http://www.jstatsoft.org/v23/i06/</a>
    </li>

    <li>
      <pkg>pcalg</pkg>
      Standard and robust estimation of the skeleton (ugraph) and the equivalence class
      of a Directed Acyclic Graph (DAG) via the PC-Algorithm. The equivalence class is
      represented by its (unique) Completed Partially Directed Acyclic Graph (CPDAG).
    </li>

    <li>
      <rforge>qp</rforge>
      This package is deprecated and it is now only a stub for the newer
      version called qpgraph available through the Bioconductor
      project. The q-order partial correlation graph search algorithm,
      q-partial, or qp, algorithm for short, is a robust procedure for
      structure learning of undirected Gaussian graphical Markov
      models from "small n, large p" data, that is, multivariate
      normal data coming from a number of random variables p larger
      than the number of multidimensional data points n as in the case
      of, e.g., microarray data.
    </li>

    <li>
      <bioc>qpgraph</bioc>
      q-order partial correlation graphs, or qp-graphs for short, are
      undirected Gaussian graphical Markov models that represent
      q-order partial correlations. They are useful for learning
      undirected graphical Gaussian Markov models from data sets where
      the number of random variables p exceeds the available sample
      size n as, for instance, in the case of microarray data where
      they can be employed to reverse engineer a molecular regulatory
      network.
    </li>


    <li>
      <pkg>QUIC</pkg>
      Regularized sparse inverse covariance matrix estimation. Use
      Newton's method and coordinate descent to solve the regularized
      inverse covariance matrix estimation problem.
    </li>

    <li>
      <pkg>SIN</pkg>
      This package provides routines to perform SIN model selection as
      described in Drton and Perlman (2004).  The selected models are
      represented in the format of the 'ggm' package, which allows in
      particular parameter estimation in the selected model.
    </li>


    <li>
      <pkg>networkDynamic</pkg>
			Dynamic Extensions for Network  Objects. Simple interface routines to facilitate the
      handling of network objects with complex intertemporal
      data. "networkDynamic" is a part of the "statnet" suite of
      packages for network analysis.
    </li>

    <li>
      <pkg>ndtv</pkg> Network Dynamic Temporal Visualizations. Renders
      dynamic network data from "networkDynamic" objects as animated
      movies or other representations of relational structure and node
      attributes that change over time.
    </li>


  </ul>

  <p><strong>Bayesian Networks/Probabilistic expert systems</strong></p>
  <ul>

    <li>
      <pkg>abn</pkg>
      A graphical modelling formulation is used to construct Bayesian
      regression models for analyses of multivariate data.
    </li>

    <li>
      <pkg>bnlearn</pkg>
      Bayesian network structure learning via constraint-based (also known as
      'conditional independence') and score-based algorithms. This package implements the
      Grow-Shrink (GS) algorithm, the Incremental Association (IAMB) algorithm, the
      Interleaved-IAMB (Inter-IAMB) algorithm, the Fast-IAMB (Fast-IAMB) algorithm, the
      Max-Min Parents and Children (MMPC) algorithm and the Hill-Climbing (HC) greedy
      search algorithm for both discrete and Gaussian networks, along with many score
      functions and conditional independence tests. Some utility functions (model
      comparison and manipulation, random data generation, arc orientation testing) are
      also included.
    </li>

    <li>
      <pkg>deal</pkg>
      Learning Bayesian networks with mixed (discrete and continuous) variables.
    </li>

    <li>
      <pkg>gRain</pkg>
      A package for probability propagation in graphical
      independence networks, also known as probabilistic
      expert systems (which includes Bayesian networks as
      a special case).
      Link: <a href="http://www.jstatsoft.org/v46/i10/">http://www.jstatsoft.org/v46/i10/</a>
    </li>

    <li>
      <rforge>RHugin</rforge>
      The Hugin Decision Engine (HDE) is commercial software produced by
      HUGIN EXPERT A/S for building and making inference from Bayesian
      belief networks. The RHugin package provides a suite of
      functions allowing the HDE to be controlled from within the R
      environment for statistical computing. The RHugin package can
      thus be used to build Bayesian belief networks, enter and
      propagate evidence, and to retrieve beliefs. Additionally, the
      RHugin package can read and write hkb and NET files, making it
      easy to work simultaneously with both the RHugin package and the
      Hugin GUI. A licensed copy of the HDE (or the trial version) is
      required for the RHugin package to function, hence the target
      audience for the package is Hugin users who would like to take
      advantage of the statistical and programatic capabilities of R.
      Notice: RHugin is NOT on CRAN.
      Link: <a href="http://rhugin.r-forge.r-project.org/">http://rhugin.r-forge.r-project.org/</a>
    </li>


  </ul>


  <p><strong>BUGS models</strong></p>
  <ul>

    <li>
      <pkg>bayesmix</pkg>
      Bayesian mixture models of univariate Gaussian distributions using
      JAGS.
    </li>

    <li>
      <pkg>dclone</pkg>
      Data Cloning and MCMC Tools for Maximum Likelihood Methods. Low
      level functions for implementing maximum likelihood estimating
      procedures for complex models using data cloning and Bayesian
      Markov chain Monte Carlo methods with support for JAGS, WinBUGS
      and OpenBUGS. Parallel MCMC computation is supported and can
      result in considerable speed-up.
    </li>

    <li>
      <pkg>boa</pkg>
      boa: Bayesian Output Analysis Program (BOA) for MCMC. A
      menu-driven program and library of functions for carrying out
      convergence diagnostics and statistical and graphical analysis of
      Markov chain Monte Carlo sampling output.
    </li>

    <li>
      <pkg>BRugs</pkg>
      BRugs: R interface to the OpenBUGS MCMC software.
      Fully-interactive R interface to the OpenBUGS software for Bayesian
      analysis using MCMC sampling. Runs natively and stably in 32-bit
      R under Windows. Versions running on Linux and on 64-bit R under
      Windows are in "beta" status and less efficient.
    </li>

    <li>
      <pkg>coda</pkg>
      coda: Output analysis and diagnostics for MCMC.
      Output analysis and diagnostics for Markov Chain Monte Carlo simulations.
    </li>

    <li>
      <pkg>ergm</pkg>
      ergm: Fit, Simulate and Diagnose Exponential-Family Models for
      Networks.
      An integrated set of tools to analyze and simulate networks based on
      exponential-family random graph models (ERGM). "ergm" is a part of
      the <a href="http://statnet.org/">statnet</a> suite of packages for network analysis.
    </li>

    <li>
      <pkg>R2OpenBUGS</pkg>
      R2OpenBUGS: Running OpenBUGS from R.
      Using this package, it is possible to call a BUGS model, summarize
      inferences and convergence in a table and graph, and save the
      simulations in arrays for easy access in R.
    </li>

    <li>
      <pkg>R2WinBUGS</pkg>
      Running WinBUGS and OpenBUGS from R / S-PLUS.
      Using this package, it is possible to call a BUGS model, summarize
      inferences and convergence in a table and graph, and save the
      simulations in arrays for easy access in R / S-PLUS. In S-PLUS,
      the openbugs functionality and the windows emulation functionality
      is not yet available.
    </li>

    <li>
    <pkg>rbugs</pkg>
    Fusing R and OpenBugs.
    Functions to prepare files needed for running BUGS in batch-mode, and
    running BUGS from R. Support for Linux and Windows systems with
    OpenBugs is emphasized.
    </li>

    <li>
    <pkg>rjags</pkg>
    rjags: Bayesian graphical models using MCMC.
    Interface to the JAGS MCMC library.
    </li>

  </ul>

  </info>

  <packagelist>
    <pkg>abn</pkg>
    <pkg>bayesmix</pkg>
    <pkg>bnlearn</pkg>
    <pkg>boa</pkg>
    <pkg>BDgraph</pkg>
    <pkg>BRugs</pkg>
    <pkg>catnet</pkg>
    <pkg>coda</pkg>
    <pkg>dclone</pkg>
    <pkg>deal</pkg>
    <pkg>diagram</pkg>
    <pkg>dynamicGraph</pkg>
    <pkg>ergm</pkg>
    <pkg>FBFsearch</pkg>
    <pkg>GeneNet</pkg>
    <pkg>huge</pkg>
    <pkg>ggm</pkg>
    <pkg>giRaph</pkg>
    <pkg>gRain</pkg>
    <pkg>gRapHD</pkg>
    <pkg priority="core">gRbase</pkg>
    <pkg>gRc</pkg>
    <pkg>gRim</pkg>
    <pkg>igraph</pkg>
    <pkg>mathgraph</pkg>
    <pkg>ndtv</pkg>
    <pkg>network</pkg>
    <pkg>networkDynamic</pkg>
    <pkg>parcor</pkg>
    <pkg>pcalg</pkg>
    <pkg>QUIC</pkg>
    <pkg>SIN</pkg>
    <pkg>R2OpenBUGS</pkg>
    <pkg>R2WinBUGS</pkg>
    <pkg>rbugs</pkg>
    <pkg>rjags</pkg>
  </packagelist>

  <links>
    <a href="http://www.R-project.org/gR/">gR initiative homepage and mailing list</a>
    <rforge>qp</rforge>
    <rforge>RHugin</rforge>
    <bioc>graph</bioc>
    <bioc>qpgraph</bioc>
    <bioc>RBGL</bioc>
    <bioc>Rgraphviz</bioc>
    <a href="http://www.Bioconductor.org/">Bioconductor</a>
    <a href="http://mcmc-jags.sourceforge.net/">JAGS</a>
    <a href="http://www.openbugs.info/w/">OpenBUGS</a>
    <a href="http://www.mrc-bsu.cam.ac.uk/bugs/">WinBUGS</a>
    <a href="http://www.hypergraph.dk/">MIM</a>
    <a href="https://code.google.com/p/bnt/">Bayes Net Toolbox for MATLAB</a>
    <a href="http://www.phil.cmu.edu/projects/tetrad/">TETRAD</a>
    <a href="http://www.stats.bris.ac.uk/~peter/Grappa/">Grappa</a>
    <a href="http://rhugin.r-forge.r-project.org/">RHugin</a>

  </links>

</CRANTaskView>

