Commit b7f00e94 authored by Gilles Kratzer's avatar Gilles Kratzer
Browse files

typos

parent c76d7bcd
Pipeline #1641 passed with stage
in 1 second
......@@ -18,3 +18,4 @@ Suggests: bnlearn, knitr, rmarkdown, ggdag, testthat
VignetteBuilder: knitr
URL: https://www.math.uzh.ch/pages/mcmcabn/
BugReports: https://git.math.uzh.ch/gkratz/mcmcabn/issues
RoxygenNote: 6.1.1
This diff is collapsed.
......@@ -122,14 +122,14 @@
</div>
<p>Kratzer G, Furrer R (2018).
<p>Kratzer G, Furrer R (2019).
&ldquo;Is a single unique Bayesian network enough to accurately represent your data?&rdquo;
<em>arXiv preprint arXiv:1902.06641</em>.
</p>
<pre>@Article{,
title = {Is a single unique Bayesian network enough to accurately represent your data?},
author = {Gilles Kratzer and Reinhard Furrer},
year = {2018},
year = {2019},
journal = {arXiv preprint arXiv:1902.06641},
}</pre>
<p>Kratzer G, Furrer R (2019).
......
......@@ -99,7 +99,7 @@
<div id="quick-start" class="section level2">
<h2 class="hasAnchor">
<a href="#quick-start" class="anchor"></a>Quick start</h2>
<p>To install <code>mcmabn</code> you need two R packages: <a href="https://CRAN.R-project.org/package=abn">abn</a> and <a href="https://CRAN.R-project.org/package=gRbase">gRbase</a> that requires libraries stored not stored on <a href="https://cran.r-project.org/">CRAN</a> but on <a href="http://www.bioconductor.org/">bioconductor</a>:</p>
<p>To install <code>mcmabn</code> you need two R packages: <a href="https://CRAN.R-project.org/package=abn">abn</a> and <a href="https://CRAN.R-project.org/package=gRbase">gRbase</a> that requires libraries stored not stored on <a href="https://cran.r-project.org/">CRAN</a> but on <a href="http://www.bioconductor.org/">bioconductor</a>. Hence you <strong>must</strong> install these packages <strong>before</strong> installing <code>mcmcabn</code>:</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="cf">if</span> (<span class="op">!</span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/ns-load">requireNamespace</a></span>(<span class="st">"BiocManager"</span>, <span class="dt">quietly =</span> <span class="ot">TRUE</span>))
<span class="kw"><a href="https://www.rdocumentation.org/packages/utils/topics/install.packages">install.packages</a></span>(<span class="st">"BiocManager"</span>)
BiocManager<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/BiocManager/topics/install">install</a></span>(<span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="st">"RBGL"</span>,<span class="st">"Rgraphviz"</span>,<span class="st">"graph"</span>), <span class="dt">version =</span> <span class="st">"3.8"</span>)
......
......@@ -171,13 +171,25 @@
<td>
<p><code><a href="plot.html">plot(<i>&lt;mcmcabn&gt;</i>)</a></code> </p>
</td>
<td><p>Function to MCMC samples generated by mcmcabn</p></td>
<td><p>Function to plot mcmcabn class objects</p></td>
</tr><tr>
<td>
<p><code><a href="print.html">print(<i>&lt;mcmcabn&gt;</i>)</a></code> </p>
</td>
<td><p>Methods for mcmcabn objects</p></td>
</tr><tr>
<td>
<p><code><a href="query.html">query()</a></code> </p>
</td>
<td><p>Function to query MCMC samples generated by mcmcabn</p></td>
</tr><tr>
<td>
<p><code><a href="summary.html">summary(<i>&lt;mcmcabn&gt;</i>)</a></code> </p>
</td>
<td><p>Function to summarize MCMC run generated by mcmcabn</p></td>
</tr>
</tbody>
</table>
......
......@@ -136,8 +136,8 @@
<h2 class="hasAnchor" id="format"><a class="anchor" href="#format"></a>Format</h2>
<p>The data contains an object of class mcmcabn.</p><ul>
<li><p><code>mcmc.out.asia</code>: an object of class mcmcabn.</p></li>
<p>The data contains an object of class <code>mcmcabn</code>.</p><ul>
<li><p><code>mcmc.out.asia</code>: an object of class <code>mcmcabn</code>.</p></li>
</ul>
......@@ -145,7 +145,7 @@
<pre class="examples"><span class='co'># NOT RUN {</span>
<span class='co'>## This data set was generated using the following code:</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/library'>library</a></span>(<span class='no'>bnlearn</span>) <span class='co'>#for the dataset</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/library'>library</a></span>(<span class='no'>abn</span>) <span class='co'>#for the cache of score function</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/library'>library</a></span>(<span class='no'>abn</span>) <span class='co'>#for the cache of scores computing function</span>
<span class='co'>#renaming columns of the dataset</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/colnames'>colnames</a></span>(<span class='no'>asia</span>) <span class='kw'>&lt;-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"Asia"</span>,
......
......@@ -32,7 +32,7 @@
<meta property="og:title" content="Structural MCMC sampler for DAGs — mcmcabn" />
<meta property="og:description" content="This function is a structural Monte Carlo Markov Chain Model Choice (MC^3) that is equipped with two radical possible MCMC moves that are purposed to accelerate chain mixing." />
<meta property="og:description" content="This function is a structural Monte Carlo Markov Chain Model Choice (MC)^3 sampler that is equipped with two large scale MCMC moves that are purposed to accelerate chain mixing." />
<meta name="twitter:card" content="summary" />
......@@ -128,7 +128,7 @@
<div class="ref-description">
<p>This function is a structural Monte Carlo Markov Chain Model Choice (MC^3) that is equipped with two radical possible MCMC moves that are purposed to accelerate chain mixing.</p>
<p>This function is a structural Monte Carlo Markov Chain Model Choice (MC)^3 sampler that is equipped with two large scale MCMC moves that are purposed to accelerate chain mixing.</p>
</div>
......@@ -159,7 +159,7 @@
</tr>
<tr>
<th>data.dists</th>
<td><p>a named list giving the distribution for each node in the network, see details</p></td>
<td><p>a named list giving the distribution for each node in the network, see details.</p></td>
</tr>
<tr>
<th>max.parents</th>
......@@ -199,17 +199,17 @@
</tr>
<tr>
<th>prior.choice</th>
<td><p>an integer, 1 or 2, where 1 is a uniform structural prior and 2 uses a weighted prior, see details</p></td>
<td><p>an integer, 1 or 2, where 1 is a uniform structural prior and 2 uses a weighted prior, see details.</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
<p>The procedure runs a structural Monte Carlo Markov Chain Model Choice (MC^3) to find the most probable posterior network (DAG). The default algorithm is based on three MCMC move: edge addition, edge deletion and edge reversal. This algorithm is known as the MC^3 (Monte Carlo Markov Chain Model Choice). It is know to mix slowly and getting stuck in low probability regions. Indeed, changing of Markov equivalence region often requires multiple MCMC moves. Then two radical MCMC move are implemented and can be probability wise tuned by user. The new edge reversal move (REV) from Grzegorczyk and Husmeier (2008) and the Markov blanket resampling (MBR) from Su and Borsuk (2016). The classical reversal move depends on the global configuration of the parents and children, but then fails to propose MCMC jumps that produce valid but very different DAGs in a unique move. The MBR workaround applies the same idea but to the entire Markov blanket of a randomly chosen node.</p>
<p>The classical MC^3 is unbiased but inefficient in mixing, the two radical MCMC alternative move are known to massively accelerate mixing without introducing biases. But those move are computationally expensive. Then low frequencies are advised.</p>
<p>The parameter prior.choice determines the prior used within each individual node for a given choice of parent combination. In Koivisto and Sood (2004) p.554 a form of prior is used which assumes that the prior probability for parent combinations comprising of the same number of parents are all equal. Specifically, that the prior probability for parent set G with cardinality |G| is proportional to 1/[n-1 choose |G|] where there are n total nodes. Note that this favours parent combinations with either very low or very high cardinality which may not be appropriate. This prior is used when <code>prior.choice=2</code>. When prior.choice=1 an uninformative prior is used where parent combinations of all cardinalities are equally likely. When <code>prior.choice=3</code> a user defined prior is used, defined by <code>prior.dag</code>. It is given by an adjacency matrix (squared and same size as number of nodes) where entries ranging from zero to one give the user prior belief. An hyper parameter defining the global user belief in the prior is given by <code>prior.lambda</code>.</p>
<p>The procedure runs a structural Monte Carlo Markov Chain Model Choice (MC)^3 to find the most probable posterior network (DAG). The default algorithm is based on three MCMC move: edge addition, edge deletion and edge reversal. This algorithm is known as the (MC)^3. It is known to mix slowly and getting stuck in low probability regions. Indeed, changing of Markov equivalence region often requires multiple MCMC moves. Then large scale MCMC moves are implemented. Their relative frequency can be set by the user. The new edge reversal move (REV) from Grzegorczyk and Husmeier (2008) and the Markov blanket resampling (MBR) from Su and Borsuk (2016). The classical reversal move depends on the global configuration of the parents and children and fails to propose MCMC jumps that produce valid but very different DAGs in a unique move. The REV move sample globally a new set of parent. The MBR workaround applies the same idea but to the entire Markov blanket of a randomly chosen node.</p>
<p>The classical (MC)^3 is unbiased but inefficient in mixing, the two radical MCMC alternative move are known to massively accelerate mixing without introducing biases. But those move are computationally expensive. Then low frequencies are advised. The REV move is not necessarily ergotic , then it should not be used alone.</p>
<p>The parameter <code>prior.choice</code> determines the prior used within each individual node for a given choice of parent combination. In Koivisto and Sood (2004) p.554 a form of prior is used which assumes that the prior probability for parent combinations comprising of the same number of parents are all equal. Specifically, that the prior probability for parent set G with cardinality |G| is proportional to 1/[n-1 choose |G|] where there are n total nodes. Note that this favours parent combinations with either very low or very high cardinality which may not be appropriate. This prior is used when <code>prior.choice=2</code>. When prior.choice=1 an uninformative prior is used where parent combinations of all cardinalities are equally likely. When <code>prior.choice=3</code> a user defined prior is used, defined by <code>prior.dag</code>. It is given by an adjacency matrix (squared and same size as number of nodes) where entries ranging from zero to one give the user prior belief. An hyper parameter defining the global user belief in the prior is given by <code>prior.lambda</code>.</p>
<p>MCMC sampler came with asymptotic statistical guarantees. Therefore it is highly advised to run multiple long enough chains. The burn in phase length (i.e throwing away first MCMC iterations) should be adequately chosen.</p>
<p>Binary variables must be declared as factors with two levels, and the argument data.dists must be a list with named arguments, one for each of the variables in <code>data.df</code> (except a grouping variable - if present), where each entry is either "poisson","binomial", or "gaussian"</p>
<p>The argument <code>data.dists</code> must be a list with named arguments, one for each of the variables in <code>data.df</code>, where each entry is either "poisson","binomial", or "gaussian"</p>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
......
......@@ -6,7 +6,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Function to MCMC samples generated by mcmcabn — plot.mcmcabn • mcmcabn</title>
<title>Function to plot mcmcabn class objects — plot.mcmcabn • mcmcabn</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
......@@ -30,9 +30,9 @@
<meta property="og:title" content="Function to MCMC samples generated by mcmcabn — plot.mcmcabn" />
<meta property="og:title" content="Function to plot mcmcabn class objects — plot.mcmcabn" />
<meta property="og:description" content="plot method for mcmcabn objects." />
<meta property="og:description" content="Generic function to plot mcmcabn objects." />
<meta name="twitter:card" content="summary" />
......@@ -121,14 +121,14 @@
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Function to MCMC samples generated by mcmcabn</h1>
<h1>Function to plot mcmcabn class objects</h1>
<div class="hidden name"><code>plot.Rd</code></div>
</div>
<div class="ref-description">
<p>plot method for mcmcabn objects.</p>
<p>Generic function to plot <code>mcmcabn</code> objects.</p>
</div>
......@@ -150,22 +150,23 @@ plot(x,
</tr>
<tr>
<th>&#8230;</th>
<td><p>arguments to be passed to methods</p></td>
<td><p>arguments to be passed to methods.</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
<p>The plot function for mcmcabn objects is based on ggplot2, ggpubr and cowplot. By default it return a trace plot with coloured points when MBR and REV methods have been used. It has histograms on the right of the densities of MC3, MBR and REV MCMC jumps respectively.</p>
<p>The plot function for mcmcabn objects is based on <span class="pkg">ggplot2</span>, <span class="pkg">ggpubr</span> and <span class="pkg">cowplot</span> packages. By default it returns a trace plot with coloured points when MBR and REV methods have been used. It displays histograms on the right of the densities of (MC)^3, MBR and REV MCMC jumps respectively.</p>
<h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2>
<p>H. Wickham. ggplot2: Elegant Graphics for Data Analysis. Springer-Verlag New York, 2016.</p>
<p>Plotting ability:
H. Wickham. ggplot2: Elegant Graphics for Data Analysis. Springer-Verlag New York, 2016.</p>
<p>Alboukadel Kassambara (2018). ggpubr: 'ggplot2' Based Publication Ready Plots. R package version 0.2. https://CRAN.R-project.org/package=ggpubr</p>
<p>Claus O. Wilke (2019). cowplot: Streamlined Plot Theme and Plot Annotations for 'ggplot2'. R package version 0.9.4. https://CRAN.R-project.org/package=cowplot</p>
<p>M. Barrett (2018). ggdag: Analyze and Create Elegant Directed Acyclic Graphs. R package version
0.1.0. https://CRAN.R-project.org/package=ggdag</p>
<p>Scutari, M. (2010). Learning Bayesian Networks with the bnlearn R Package. Journal of Statistical Software, 35(3), 1 - 22. doi:http://dx.doi.org/10.18637/jss.v035.i03.</p>
<p>Data:
Scutari, M. (2010). Learning Bayesian Networks with the bnlearn R Package. Journal of Statistical Software, 35(3), 1 - 22. doi:http://dx.doi.org/10.18637/jss.v035.i03.</p>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
......
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Methods for mcmcabn objects — print.mcmcabn • mcmcabn</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<!-- sticky kit -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Methods for mcmcabn objects — print.mcmcabn" />
<meta property="og:description" content="" />
<meta property="og:description" content="Method for computing on mcmcabn objects." />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">mcmcabn</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home"></span>
</a>
</li>
<li>
<a href="../articles/mcmcabn.html">Vignette</a>
</li>
<li>
<a href="../news/index.html">
<span class="fa fa-newspaper-o"></span>
news
</a>
</li>
<li>
<a href="../reference/index.html">
<span class="fa fa-file-code-o"></span>
functions
</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://git.math.uzh.ch/gkratz/mcmcabn">
<span class="fa fa-gitlab fa-lg"></span>
gitlab
</a>
</li>
<li>
<a href="http://twitter.com/GillesKratzer">
<span class="fa fa-lg fa-twitter"></span>
twitter
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Methods for mcmcabn objects</h1>
<div class="hidden name"><code>print.Rd</code></div>
</div>
<div class="ref-description">
<p>Method for computing on <code>mcmcabn</code> objects.</p>
</div>
<pre class="usage"># S3 method for mcmcabn
print(x, &#8230;)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>x</th>
<td><p>an object of class <code>mcmcabn</code>.</p></td>
</tr>
<tr>
<th>&#8230;</th>
<td><p>additional arguments passed to <code>print</code>.</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
<p>There exists a <code><a href='https://www.rdocumentation.org/packages/base/topics/summary'>summary</a></code> S3 function that displays more details.</p>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><span class='co'># NOT RUN {</span>
<span class='co'>## Example from the asia dataset from Lauritzen and Spiegelhalter (1988) provided by Scutari (2010)</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/utils/topics/data'>data</a></span>(<span class='st'>"mcmc_run_asia"</span>)
<span class='co'>#print the MCMC run</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/print'>print</a></span>(<span class='no'>mcmc.out.asia</span>)
<span class='co'># }</span></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#details">Details</a></li>
<li><a href="#examples">Examples</a></li>
</ul>
<h2>Author</h2>
<p>Gilles Kratzer</p>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by <a href='https://gilleskratzer.netlify.com/'>Gilles Kratzer</a>.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
</div>
</footer>
</div>
</body>
</html>
......@@ -32,7 +32,7 @@
<meta property="og:title" content="Function to query MCMC samples generated by mcmcabn — query" />
<meta property="og:description" content="The function allows user to perform structural queries over MCMC samples produced by mcmcabn." />
<meta property="og:description" content="The function allows users to perform structural queries over MCMC samples produced by mcmcabn." />
<meta name="twitter:card" content="summary" />
......@@ -128,7 +128,7 @@
<div class="ref-description">
<p>The function allows user to perform structural queries over MCMC samples produced by mcmcabn.</p>
<p>The function allows users to perform structural queries over MCMC samples produced by <code>mcmcabn</code>.</p>
</div>
......@@ -144,14 +144,14 @@
</tr>
<tr>
<th>formula</th>
<td><p>formula statement or adjacency matrix to query the MCMC samples, see details. If this argument is NULL, then the average arc wise support is reported.</p></td>
<td><p>formula statement or adjacency matrix to query the MCMC samples, see details. If this argument is NULL, then the average arc-wise frequencies is reported.</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
<p>The query can formulated using an adjacency matrix or a formula-wise expression.</p>
<p>The adjacency matrix should be squared of dimension equal to the number of nodes in the networks. Their entries should be either 1,0 or -1. The 1 indicates the requested arcs, the -1 the excludes and the 0 all other entries that are not subject to query. The rows indicated the set of parents of the index nodes. The order of rows and column should be the same as the one used in the `mcmcabn()` function in the `data.dist` argument.</p>
<p>The query can be formulated using an adjacency matrix or a formula-wise expression.</p>
<p>The adjacency matrix should be squared of dimension equal to the number of nodes in the networks. Their entries should be either 1,0 or -1. The 1 indicates the requested arcs, the -1 the excluded and the 0 all other entries that are not subject to query. The rows indicated the set of parents of the index nodes. The order of rows and column should be the same as the one used in the `mcmcabn()` function in the `data.dist` argument.</p>
<p>The formula statement has been designed to ease querying over the MCMC sample. It allows user to make complex queries without explicitly writing an adjacency matrix (which can be painful when the number of variables is large). The formula argument can be provided using typically a formula like:
~ node1|parent1:parent2 + node2:node3|parent3. The formula statement has to start with `~`. In this example, node1 has two parents (parent1 and parent2). node2 and node3 have the same parent3. The parents names have to exactly match those given in name. `:` is the separator between either children or parents, `|` separates children (left side) and parents (right side), `+` separates
terms, `.` replaces all the variables in name. Additional, when one want to exclude an arc simply put `-` in front of that statement. Then a formula like: ~ -node1|parent1 exclude all DAGs that have an arc between parent1 and node1.</p>
......
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Function to summarize MCMC run generated by mcmcabn — summary.mcmcabn • mcmcabn</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<!-- sticky kit -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Function to summarize MCMC run generated by mcmcabn — summary.mcmcabn" />
<meta property="og:description" content="Summary method for mcmcabn objects." />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">mcmcabn</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home"></span>
</a>
</li>
<li>
<a href="../articles/mcmcabn.html">Vignette</a>
</li>
<li>
<a href="../news/index.html">
<span class="fa fa-newspaper-o"></span>
news
</a>
</li>
<li>
<a href="../reference/index.html">
<span class="fa fa-file-code-o"></span>
functions
</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://git.math.uzh.ch/gkratz/mcmcabn">
<span class="fa fa-gitlab fa-lg"></span>
gitlab
</a>
</li>
<li>
<a href="http://twitter.com/GillesKratzer">
<span class="fa fa-lg fa-twitter"></span>
twitter
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Function to summarize MCMC run generated by mcmcabn</h1>
<div class="hidden name"><code>summary.Rd</code></div>
</div>
<div class="ref-description">
<p>Summary method for mcmcabn objects.</p>
</div>
<pre class="usage"># S3 method for mcmcabn
summary(object,
quantiles = c(0.025, 0.25, 0.5, 0.75, 0.975),
lag.max = 10,
&#8230;)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>object</th>
<td><p>object of class <code>mcmcabn</code>.</p></td>
</tr>
<tr>
<th>quantiles</th>
<td><p>numeric vector of probabilities with values in [0,1]. (Values up to 2e-14 outside that range are accepted and moved to the nearby endpoint.)</p></td>
</tr>
<tr>
<th>lag.max</th>
<td><p>maximum lag at which to calculate the acf. Default is set to 10.</p></td>
</tr>
<tr>
<th>&#8230;</th>
<td><p>arguments to be passed to methods.</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
<p>The summary function for mcmcabn objects returns multiple summary metrics for assesing the quality of the MCMC run.</p>
<h2 class="hasAnchor" id="value"><a class="anchor" href=