<!DOCTYPE html>
<html lang="" xml:lang="">
<head>

  <meta charset="utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <title>CRABS: Congruent Rate Analyses in Birth-death Scenarios</title>
  <meta name="description" content="CRABS: Congruent Rate Analyses in Birth-death Scenarios" />
  <meta name="generator" content="bookdown 0.36 and GitBook 2.6.7" />

  <meta property="og:title" content="CRABS: Congruent Rate Analyses in Birth-death Scenarios" />
  <meta property="og:type" content="book" />
  
  
  

  <meta name="twitter:card" content="summary" />
  <meta name="twitter:title" content="CRABS: Congruent Rate Analyses in Birth-death Scenarios" />
  
  
  

<meta name="author" content="Sebastian Höhna" />
<meta name="author" content="Bjørn T. Kopperud" />
<meta name="author" content="Andrew F. Magee" />
<meta name="author" content="Jérémy Andréoletti" />


<meta name="date" content="2023-10-23" />

  <meta name="viewport" content="width=device-width, initial-scale=1" />
  <meta name="apple-mobile-web-app-capable" content="yes" />
  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
  
  

<link rel="next" href="installation.html"/>
<script src="lib/jquery-3.6.0/jquery-3.6.0.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/fuse.js@6.4.6/dist/fuse.min.js"></script>
<link href="lib/gitbook-2.6.7/css/style.css" rel="stylesheet" />
<link href="lib/gitbook-2.6.7/css/plugin-table.css" rel="stylesheet" />
<link href="lib/gitbook-2.6.7/css/plugin-bookdown.css" rel="stylesheet" />
<link href="lib/gitbook-2.6.7/css/plugin-highlight.css" rel="stylesheet" />
<link href="lib/gitbook-2.6.7/css/plugin-search.css" rel="stylesheet" />
<link href="lib/gitbook-2.6.7/css/plugin-fontsettings.css" rel="stylesheet" />
<link href="lib/gitbook-2.6.7/css/plugin-clipboard.css" rel="stylesheet" />








<link href="lib/anchor-sections-1.1.0/anchor-sections.css" rel="stylesheet" />
<link href="lib/anchor-sections-1.1.0/anchor-sections-hash.css" rel="stylesheet" />
<script src="lib/anchor-sections-1.1.0/anchor-sections.js"></script>


<style type="text/css">
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
pre.sourceCode { margin: 0; }
@media screen {
div.sourceCode { overflow: auto; }
}
@media print {
pre > code.sourceCode { white-space: pre-wrap; }
pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
}
pre.numberSource code
  { counter-reset: source-line 0; }
pre.numberSource code > span
  { position: relative; left: -4em; counter-increment: source-line; }
pre.numberSource code > span > a:first-child::before
  { content: counter(source-line);
    position: relative; left: -1em; text-align: right; vertical-align: baseline;
    border: none; display: inline-block;
    -webkit-touch-callout: none; -webkit-user-select: none;
    -khtml-user-select: none; -moz-user-select: none;
    -ms-user-select: none; user-select: none;
    padding: 0 4px; width: 4em;
    color: #aaaaaa;
  }
pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa;  padding-left: 4px; }
div.sourceCode
  {   }
@media screen {
pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
}
code span.al { color: #ff0000; font-weight: bold; } /* Alert */
code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
code span.at { color: #7d9029; } /* Attribute */
code span.bn { color: #40a070; } /* BaseN */
code span.bu { } /* BuiltIn */
code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
code span.ch { color: #4070a0; } /* Char */
code span.cn { color: #880000; } /* Constant */
code span.co { color: #60a0b0; font-style: italic; } /* Comment */
code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
code span.do { color: #ba2121; font-style: italic; } /* Documentation */
code span.dt { color: #902000; } /* DataType */
code span.dv { color: #40a070; } /* DecVal */
code span.er { color: #ff0000; font-weight: bold; } /* Error */
code span.ex { } /* Extension */
code span.fl { color: #40a070; } /* Float */
code span.fu { color: #06287e; } /* Function */
code span.im { } /* Import */
code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
code span.kw { color: #007020; font-weight: bold; } /* Keyword */
code span.op { color: #666666; } /* Operator */
code span.ot { color: #007020; } /* Other */
code span.pp { color: #bc7a00; } /* Preprocessor */
code span.sc { color: #4070a0; } /* SpecialChar */
code span.ss { color: #bb6688; } /* SpecialString */
code span.st { color: #4070a0; } /* String */
code span.va { color: #19177c; } /* Variable */
code span.vs { color: #4070a0; } /* VerbatimString */
code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
</style>

<style type="text/css">
  
  div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
</style>
<style type="text/css">
/* Used with Pandoc 2.11+ new --citeproc when CSL is used */
div.csl-bib-body { }
div.csl-entry {
  clear: both;
}
.hanging div.csl-entry {
  margin-left:2em;
  text-indent:-2em;
}
div.csl-left-margin {
  min-width:2em;
  float:left;
}
div.csl-right-inline {
  margin-left:2em;
  padding-left:1em;
}
div.csl-indent {
  margin-left: 2em;
}
</style>

</head>

<body>



  <div class="book without-animation with-summary font-size-2 font-family-1" data-basepath=".">

    <div class="book-summary">
      <nav role="navigation">

<ul class="summary">
<li class="chapter" data-level="1" data-path="overview.html"><a href="overview.html"><i class="fa fa-check"></i><b>1</b> Overview</a></li>
<li class="chapter" data-level="2" data-path="installation.html"><a href="installation.html"><i class="fa fa-check"></i><b>2</b> Installation</a></li>
<li class="chapter" data-level="3" data-path="features.html"><a href="features.html"><i class="fa fa-check"></i><b>3</b> Features</a>
<ul>
<li class="chapter" data-level="3.1" data-path="features.html"><a href="features.html#overview-of-functions-in-crabs"><i class="fa fa-check"></i><b>3.1</b> Overview of functions in <code>CRABS</code></a></li>
<li class="chapter" data-level="3.2" data-path="features.html"><a href="features.html#samplebasic"><i class="fa fa-check"></i><b>3.2</b> <code>sample.basic.models</code></a></li>
<li class="chapter" data-level="3.3" data-path="features.html"><a href="features.html#samplejoint"><i class="fa fa-check"></i><b>3.3</b> <code>sample.basic.models.joint</code></a></li>
</ul></li>
<li class="chapter" data-level="4" data-path="creating-the-congruence-class.html"><a href="creating-the-congruence-class.html"><i class="fa fa-check"></i><b>4</b> Creating the congruence class</a>
<ul>
<li class="chapter" data-level="4.1" data-path="creating-the-congruence-class.html"><a href="creating-the-congruence-class.html#rate-transformations"><i class="fa fa-check"></i><b>4.1</b> Rate transformations</a></li>
<li class="chapter" data-level="4.2" data-path="creating-the-congruence-class.html"><a href="creating-the-congruence-class.html#slopes-and-delta-t"><i class="fa fa-check"></i><b>4.2</b> Slopes and <span class="math inline">\(\Delta t\)</span></a></li>
<li class="chapter" data-level="4.3" data-path="creating-the-congruence-class.html"><a href="creating-the-congruence-class.html#the-model-object"><i class="fa fa-check"></i><b>4.3</b> The model object</a></li>
</ul></li>
<li class="chapter" data-level="5" data-path="testing-alternative-hypotheses.html"><a href="testing-alternative-hypotheses.html"><i class="fa fa-check"></i><b>5</b> Testing alternative hypotheses</a>
<ul>
<li class="chapter" data-level="5.1" data-path="testing-alternative-hypotheses.html"><a href="testing-alternative-hypotheses.html#alt-ext"><i class="fa fa-check"></i><b>5.1</b> Testing alternative extinction rates</a>
<ul>
<li class="chapter" data-level="5.1.1" data-path="testing-alternative-hypotheses.html"><a href="testing-alternative-hypotheses.html#constant-extinction-rates"><i class="fa fa-check"></i><b>5.1.1</b> Constant extinction rates</a></li>
<li class="chapter" data-level="5.1.2" data-path="testing-alternative-hypotheses.html"><a href="testing-alternative-hypotheses.html#linearly-increasing-extinction-rates"><i class="fa fa-check"></i><b>5.1.2</b> Linearly increasing extinction rates</a></li>
<li class="chapter" data-level="5.1.3" data-path="testing-alternative-hypotheses.html"><a href="testing-alternative-hypotheses.html#exponential-increasing-extinction-rates"><i class="fa fa-check"></i><b>5.1.3</b> Exponential increasing extinction rates</a></li>
<li class="chapter" data-level="5.1.4" data-path="testing-alternative-hypotheses.html"><a href="testing-alternative-hypotheses.html#two-epoch-extinction-rates"><i class="fa fa-check"></i><b>5.1.4</b> Two-epoch extinction rates</a></li>
<li class="chapter" data-level="5.1.5" data-path="testing-alternative-hypotheses.html"><a href="testing-alternative-hypotheses.html#reversed-trend-extinction-rates"><i class="fa fa-check"></i><b>5.1.5</b> Reversed trend extinction rates</a></li>
</ul></li>
<li class="chapter" data-level="5.2" data-path="testing-alternative-hypotheses.html"><a href="testing-alternative-hypotheses.html#testing-alternative-speciation-rates"><i class="fa fa-check"></i><b>5.2</b> Testing alternative speciation rates</a>
<ul>
<li class="chapter" data-level="5.2.1" data-path="testing-alternative-hypotheses.html"><a href="testing-alternative-hypotheses.html#constant-speciation-rates"><i class="fa fa-check"></i><b>5.2.1</b> Constant speciation rates</a></li>
<li class="chapter" data-level="5.2.2" data-path="testing-alternative-hypotheses.html"><a href="testing-alternative-hypotheses.html#exponential-increasingdecreasing-speciation-rates"><i class="fa fa-check"></i><b>5.2.2</b> Exponential increasing/decreasing speciation rates</a></li>
</ul></li>
</ul></li>
<li class="chapter" data-level="6" data-path="exploring-the-congruence-class.html"><a href="exploring-the-congruence-class.html"><i class="fa fa-check"></i><b>6</b> Exploring the congruence class</a>
<ul>
<li class="chapter" data-level="6.1" data-path="exploring-the-congruence-class.html"><a href="exploring-the-congruence-class.html#assumptions-on-rates"><i class="fa fa-check"></i><b>6.1</b> Assumptions on rates</a></li>
<li class="chapter" data-level="6.2" data-path="exploring-the-congruence-class.html"><a href="exploring-the-congruence-class.html#independent-or-joint-rate-sampling"><i class="fa fa-check"></i><b>6.2</b> Independent or joint rate sampling</a></li>
<li class="chapter" data-level="6.3" data-path="exploring-the-congruence-class.html"><a href="exploring-the-congruence-class.html#sample-alternative-extinction-rates"><i class="fa fa-check"></i><b>6.3</b> Sample alternative extinction rates</a>
<ul>
<li class="chapter" data-level="6.3.1" data-path="exploring-the-congruence-class.html"><a href="exploring-the-congruence-class.html#temporally-autocorrelated"><i class="fa fa-check"></i><b>6.3.1</b> Temporally autocorrelated</a></li>
<li class="chapter" data-level="6.3.2" data-path="exploring-the-congruence-class.html"><a href="exploring-the-congruence-class.html#exponentially-decreasing"><i class="fa fa-check"></i><b>6.3.2</b> Exponentially decreasing</a></li>
<li class="chapter" data-level="6.3.3" data-path="exploring-the-congruence-class.html"><a href="exploring-the-congruence-class.html#linearly-increasing"><i class="fa fa-check"></i><b>6.3.3</b> Linearly increasing</a></li>
<li class="chapter" data-level="6.3.4" data-path="exploring-the-congruence-class.html"><a href="exploring-the-congruence-class.html#episodic"><i class="fa fa-check"></i><b>6.3.4</b> Episodic</a></li>
<li class="chapter" data-level="6.3.5" data-path="exploring-the-congruence-class.html"><a href="exploring-the-congruence-class.html#uniform-independent"><i class="fa fa-check"></i><b>6.3.5</b> Uniform independent</a></li>
<li class="chapter" data-level="6.3.6" data-path="exploring-the-congruence-class.html"><a href="exploring-the-congruence-class.html#brownian-motion-with-a-trend"><i class="fa fa-check"></i><b>6.3.6</b> Brownian motion with a trend</a></li>
</ul></li>
<li class="chapter" data-level="6.4" data-path="exploring-the-congruence-class.html"><a href="exploring-the-congruence-class.html#sample-alternative-speciation-rates"><i class="fa fa-check"></i><b>6.4</b> Sample alternative speciation rates</a>
<ul>
<li class="chapter" data-level="6.4.1" data-path="exploring-the-congruence-class.html"><a href="exploring-the-congruence-class.html#temporally-autocorrelated-1"><i class="fa fa-check"></i><b>6.4.1</b> Temporally autocorrelated</a></li>
</ul></li>
<li class="chapter" data-level="6.5" data-path="exploring-the-congruence-class.html"><a href="exploring-the-congruence-class.html#jointly-sample-alternative-speciation-and-extinction-rates"><i class="fa fa-check"></i><b>6.5</b> Jointly sample alternative speciation and extinction rates</a>
<ul>
<li class="chapter" data-level="6.5.1" data-path="exploring-the-congruence-class.html"><a href="exploring-the-congruence-class.html#constant-joint-trajectory"><i class="fa fa-check"></i><b>6.5.1</b> Constant joint trajectory</a></li>
<li class="chapter" data-level="6.5.2" data-path="exploring-the-congruence-class.html"><a href="exploring-the-congruence-class.html#hsmrf-joint-trajectory"><i class="fa fa-check"></i><b>6.5.2</b> HSMRF joint trajectory</a></li>
<li class="chapter" data-level="6.5.3" data-path="exploring-the-congruence-class.html"><a href="exploring-the-congruence-class.html#hsmrf-joint-trajectory-with-global-regularity-filter"><i class="fa fa-check"></i><b>6.5.3</b> HSMRF joint trajectory with global regularity filter</a></li>
</ul></li>
</ul></li>
<li class="chapter" data-level="7" data-path="exploring-the-posterior.html"><a href="exploring-the-posterior.html"><i class="fa fa-check"></i><b>7</b> Exploring the posterior</a>
<ul>
<li class="chapter" data-level="7.1" data-path="exploring-the-posterior.html"><a href="exploring-the-posterior.html#reading-the-posterior"><i class="fa fa-check"></i><b>7.1</b> Reading the posterior</a></li>
<li class="chapter" data-level="7.2" data-path="exploring-the-posterior.html"><a href="exploring-the-posterior.html#sampling-congruent-models-in-the-posterior"><i class="fa fa-check"></i><b>7.2</b> Sampling congruent models in the posterior</a></li>
</ul></li>
<li class="chapter" data-level="8" data-path="estimating-birth-death-models.html"><a href="estimating-birth-death-models.html"><i class="fa fa-check"></i><b>8</b> Estimating birth-death models</a>
<ul>
<li class="chapter" data-level="8.1" data-path="estimating-birth-death-models.html"><a href="estimating-birth-death-models.html#reading-the-phylogenetic-tree"><i class="fa fa-check"></i><b>8.1</b> Reading the phylogenetic tree</a></li>
<li class="chapter" data-level="8.2" data-path="estimating-birth-death-models.html"><a href="estimating-birth-death-models.html#tess"><i class="fa fa-check"></i><b>8.2</b> TESS Analysis</a></li>
<li class="chapter" data-level="8.3" data-path="estimating-birth-death-models.html"><a href="estimating-birth-death-models.html#treepar"><i class="fa fa-check"></i><b>8.3</b> TreePar</a></li>
<li class="chapter" data-level="8.4" data-path="estimating-birth-death-models.html"><a href="estimating-birth-death-models.html#revbayes"><i class="fa fa-check"></i><b>8.4</b> The HSMRF model in RevBayes</a></li>
</ul></li>
<li class="chapter" data-level="9" data-path="references.html"><a href="references.html"><i class="fa fa-check"></i><b>9</b> References</a></li>
</ul>

      </nav>
    </div>

    <div class="book-body">
      <div class="body-inner">
        <div class="book-header" role="navigation">
          <h1>
            <i class="fa fa-circle-o-notch fa-spin"></i><a href="./">CRABS: Congruent Rate Analyses in Birth-death Scenarios</a>
          </h1>
        </div>

        <div class="page-wrapper" tabindex="-1" role="main">
          <div class="page-inner">

            <section class="normal" id="section-">
<div id="header">
<h1 class="title">CRABS: Congruent Rate Analyses in Birth-death Scenarios</h1>
<p class="author"><em>Sebastian Höhna</em></p>
<p class="author"><em>Bjørn T. Kopperud</em></p>
<p class="author"><em>Andrew F. Magee</em></p>
<p class="author"><em>Jérémy Andréoletti</em></p>
<p class="date"><em>2023-10-23</em></p>
</div>
<div id="overview" class="section level1 hasAnchor" number="1">
<h1><span class="header-section-number">1</span> Overview<a href="overview.html#overview" class="anchor-section" aria-label="Anchor link to header"></a></h1>
<p>This is a vignette, or long-form documentation, accompanying the R-package CRABS: Congruent Rate Analyses in Birth-death Scenarios.</p>
<p>The main purpose of <code>CRABS</code> is to explore congruence classes of macroevolutionary diversification rates.
Specifically, this tutorial has two main aims/applications:</p>
<ul>
<li>For a given speciation and extinction rate, you can compute the alternative speciation and extinction rates via the pulled net-diversification rate</li>
<li>For a given speciation and extinction rate, which might have been estimated from a phylogenetic tree or provided simply for exploration purposes, you can explore the entire congruence class given some rate assumptions (e.g., type of change or min and max rates).</li>
</ul>
<p>The first use case corresponds to testing specific hypotheses while the second use case corresponds to exploring the congruence class for general patterns/trends.
We will explain these in detail below with an empirical example.</p>
</div>
            </section>

          </div>
        </div>
      </div>

<a href="installation.html" class="navigation navigation-next navigation-unique" aria-label="Next page"><i class="fa fa-angle-right"></i></a>
    </div>
  </div>
<script src="lib/gitbook-2.6.7/js/app.min.js"></script>
<script src="lib/gitbook-2.6.7/js/clipboard.min.js"></script>
<script src="lib/gitbook-2.6.7/js/plugin-search.js"></script>
<script src="lib/gitbook-2.6.7/js/plugin-sharing.js"></script>
<script src="lib/gitbook-2.6.7/js/plugin-fontsettings.js"></script>
<script src="lib/gitbook-2.6.7/js/plugin-bookdown.js"></script>
<script src="lib/gitbook-2.6.7/js/jquery.highlight.js"></script>
<script src="lib/gitbook-2.6.7/js/plugin-clipboard.js"></script>
<script>
gitbook.require(["gitbook"], function(gitbook) {
gitbook.start({
"sharing": {
"github": false,
"facebook": true,
"twitter": true,
"linkedin": false,
"weibo": false,
"instapaper": false,
"vk": false,
"whatsapp": false,
"all": ["facebook", "twitter", "linkedin", "weibo", "instapaper"]
},
"fontsettings": {
"theme": "white",
"family": "sans",
"size": 2
},
"edit": {
"link": null,
"text": null
},
"history": {
"link": null,
"text": null
},
"view": {
"link": null,
"text": null
},
"download": null,
"search": false,
"toc": {
"collapse": "subsection"
}
});
});
</script>

<!-- dynamically load mathjax for compatibility with self-contained -->
<script>
  (function () {
    var script = document.createElement("script");
    script.type = "text/javascript";
    var src = "true";
    if (src === "" || src === "true") src = "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.9/latest.js?config=TeX-MML-AM_CHTML";
    if (location.protocol !== "file:")
      if (/^https?:/.test(src))
        src = src.replace(/^https?:/, '');
    script.src = src;
    document.getElementsByTagName("head")[0].appendChild(script);
  })();
</script>
</body>

</html>
