Skip to content

Commit

Permalink
Tweaks on the biblio and case studies.
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviergimenez committed Aug 15, 2023
1 parent 53f8258 commit e2fb494
Show file tree
Hide file tree
Showing 23 changed files with 594 additions and 553 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
740 changes: 370 additions & 370 deletions book.bib

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion covariates.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ Splines à la @gimenez_semiparametric_2006, possibly w/ jagam <https://rdrr.io/c

RJMCMC in @gimenez2009fitness on Common blackbirds or @gimenez2009winbugs on White stork.

As an illustration, we use data on the white stork {\it Ciconia ciconia} population in Baden W\"{u}rttemberg (Germany), consisting of 321 capture histories of individuals ringed as chicks between 1956 and 1971. From the 60's to the 90's, all Western European stork populations were declining @bair91. This trend was likely the result of reduced food availability @schau05 caused by severe droughts observed in the wintering ground of storks in the Sahel region. This hypothesis has been examined in several studies (@kanya90 and @barb99).

## Sex uncertainty

@PradelEtAl2008 and @genovart_exploiting_2012
@pradel2008sex and @genovart_exploiting_2012

## Actuarial senescence

Expand Down
2 changes: 1 addition & 1 deletion dispersal.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -1155,5 +1155,5 @@ Breeders are difficult to assigned to the correct state. Non-breeders are relati

+ Sites: @arnason1972, @arnason1973, @SchwarzEtAl1993. States: @NicholsEtAl1992 (microtus and mass as state); @NicholsEtAl1994 (microtus and reproductive costs). For a review of multistate models, see @LebretonEtAl2009.

+ Uncertainty: Seminal paper by @Pradel2005. @dupuis_bayesian_1995 had a similar idea for the Arnason-Schwarz model. See also for a review @GimenezEtAl2012.
+ Uncertainty: Seminal paper by @pradel_multievent_2005. @dupuis_bayesian_1995 had a similar idea for the Arnason-Schwarz model. See also for a review @gimenez_estimating_2012.

Binary file modified docs/banana-book_files/figure-html/unnamed-chunk-22-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 6 additions & 5 deletions docs/covariateschapter.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Chapter 6 Covariates | Bayesian Analysis of Capture-Recapture Data with Hidden Markov Models</title>
<meta name="author" content="Olivier Gimenez">
<meta name="description" content="6.1 Missing values Work on missing values by Bonner and Schwarz (2006) (see Gimenez et al. (2009)) and Langrock, King, et al. (2013) and Worthington, King, and Buckland (2015). See also Rose et...">
<meta name="description" content="6.1 Missing values Work on missing values by Bonner and Schwarz (2006) (see Gimenez et al. (2009)) and Langrock and King (2013) and Worthington, King, and Buckland (2015). See also Rose et al....">
<meta name="generator" content="bookdown 0.33 with bs4_book()">
<meta property="og:title" content="Chapter 6 Covariates | Bayesian Analysis of Capture-Recapture Data with Hidden Markov Models">
<meta property="og:type" content="book">
<meta property="og:url" content="https://oliviergimenez.github.io/bayesian-cr-workshop/covariateschapter.html">
<meta property="og:description" content="6.1 Missing values Work on missing values by Bonner and Schwarz (2006) (see Gimenez et al. (2009)) and Langrock, King, et al. (2013) and Worthington, King, and Buckland (2015). See also Rose et...">
<meta property="og:description" content="6.1 Missing values Work on missing values by Bonner and Schwarz (2006) (see Gimenez et al. (2009)) and Langrock and King (2013) and Worthington, King, and Buckland (2015). See also Rose et al....">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Chapter 6 Covariates | Bayesian Analysis of Capture-Recapture Data with Hidden Markov Models">
<meta name="twitter:description" content="6.1 Missing values Work on missing values by Bonner and Schwarz (2006) (see Gimenez et al. (2009)) and Langrock, King, et al. (2013) and Worthington, King, and Buckland (2015). See also Rose et...">
<meta name="twitter:description" content="6.1 Missing values Work on missing values by Bonner and Schwarz (2006) (see Gimenez et al. (2009)) and Langrock and King (2013) and Worthington, King, and Buckland (2015). See also Rose et al....">
<!-- JS --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://kit.fontawesome.com/6ecbd6c532.js" crossorigin="anonymous"></script><script src="libs/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link href="libs/bootstrap-4.6.0/bootstrap.min.css" rel="stylesheet">
<script src="libs/bootstrap-4.6.0/bootstrap.bundle.min.js"></script><script src="libs/bs3compat-0.5.0/transition.js"></script><script src="libs/bs3compat-0.5.0/tabs.js"></script><script src="libs/bs3compat-0.5.0/bs3compat.js"></script><link href="libs/bs4_book-1.0.0/bs4_book.css" rel="stylesheet">
Expand Down Expand Up @@ -105,7 +105,7 @@ <h1>
<h2>
<span class="header-section-number">6.1</span> Missing values<a class="anchor" aria-label="anchor" href="#missing-values"><i class="fas fa-link"></i></a>
</h2>
<p>Work on missing values by <span class="citation">Bonner and Schwarz (<a href="references.html#ref-bonner2006">2006</a>)</span> (see <span class="citation">Gimenez et al. (<a href="references.html#ref-gimenez2009winbugs">2009</a>)</span>) and <span class="citation">Langrock, King, et al. (<a href="references.html#ref-langrock2013maximum">2013</a>)</span> and <span class="citation">Worthington, King, and Buckland (<a href="references.html#ref-worthington2015">2015</a>)</span>. See also <span class="citation">Rose et al. (<a href="references.html#ref-rose2018">2018</a>)</span>.</p>
<p>Work on missing values by <span class="citation">Bonner and Schwarz (<a href="references.html#ref-bonner2006">2006</a>)</span> (see <span class="citation">Gimenez et al. (<a href="references.html#ref-gimenez2009winbugs">2009</a>)</span>) and <span class="citation">Langrock and King (<a href="references.html#ref-langrock2013maximum">2013</a>)</span> and <span class="citation">Worthington, King, and Buckland (<a href="references.html#ref-worthington2015">2015</a>)</span>. See also <span class="citation">Rose et al. (<a href="references.html#ref-rose2018">2018</a>)</span>.</p>
</div>
<div id="nonlinearities" class="section level2" number="6.2">
<h2>
Expand All @@ -118,12 +118,13 @@ <h2>
<span class="header-section-number">6.3</span> Covariate selection<a class="anchor" aria-label="anchor" href="#covariate-selection"><i class="fas fa-link"></i></a>
</h2>
<p>RJMCMC in <span class="citation">Gimenez, Grégoire, and Lenormand (<a href="references.html#ref-gimenez2009fitness">2009</a>)</span> on Common blackbirds or <span class="citation">Gimenez et al. (<a href="references.html#ref-gimenez2009winbugs">2009</a>)</span> on White stork.</p>
<p>As an illustration, we use data on the white stork {} population in Baden W"{u}rttemberg (Germany), consisting of 321 capture histories of individuals ringed as chicks between 1956 and 1971. From the 60’s to the 90’s, all Western European stork populations were declining <span class="citation">Bairlein (<a href="references.html#ref-bair91">1991</a>)</span>. This trend was likely the result of reduced food availability <span class="citation">Schaub, Kania, and U. (<a href="references.html#ref-schau05">2005</a>)</span> caused by severe droughts observed in the wintering ground of storks in the Sahel region. This hypothesis has been examined in several studies (<span class="citation">Kanyamibwa et al. (<a href="references.html#ref-kanya90">1990</a>)</span> and <span class="citation">Barbraud, Barbraud, and Barbraud (<a href="references.html#ref-barb99">1999</a>)</span>).</p>
</div>
<div id="sex-uncertainty" class="section level2" number="6.4">
<h2>
<span class="header-section-number">6.4</span> Sex uncertainty<a class="anchor" aria-label="anchor" href="#sex-uncertainty"><i class="fas fa-link"></i></a>
</h2>
<p><span class="citation">Roger Pradel et al. (<a href="references.html#ref-PradelEtAl2008">2008</a>)</span> and <span class="citation">Genovart, Pradel, and Oro (<a href="references.html#ref-genovart_exploiting_2012">2012</a>)</span></p>
<p><span class="citation">Pradel et al. (<a href="references.html#ref-pradel2008sex">2008</a>)</span> and <span class="citation">Genovart, Pradel, and Oro (<a href="references.html#ref-genovart_exploiting_2012">2012</a>)</span></p>
</div>
<div id="actuarial-senescence" class="section level2" number="6.5">
<h2>
Expand Down
6 changes: 3 additions & 3 deletions docs/crashcourse.html
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ <h3>
<div class="sourceCode" id="cb7"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="va">sample_from_posterior</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/stats/Beta.html">rbeta</a></span><span class="op">(</span><span class="fl">1000</span>, <span class="fl">20</span>, <span class="fl">39</span><span class="op">)</span> <span class="co"># draw 1000 values from posterior survival beta(20,39)</span></span>
<span><span class="fu"><a href="https://rdrr.io/r/base/mean.html">mean</a></span><span class="op">(</span><span class="va">sample_from_posterior</span><span class="op">)</span> <span class="co"># compute mean with Monte Carlo integration</span></span>
<span><span class="co">## [1] 0.3407</span></span></code></pre></div>
<span><span class="co">## [1] 0.3404</span></span></code></pre></div>
<p>You may check that the mean we have just calculated matches closely the expectation of a beta distribution<a class="footnote-ref" tabindex="0" data-toggle="popover" data-content='&lt;p&gt;If &lt;span class="math inline"&gt;\(X\)&lt;/span&gt; is a random variable with distribution &lt;span class="math inline"&gt;\(\text{beta}(a, b)\)&lt;/span&gt;, then &lt;span class="math inline"&gt;\(E(X) = \displaystyle{\frac{a}{a + b}}\)&lt;/span&gt;&lt;/p&gt;'><sup>10</sup></a>:</p>
<div class="sourceCode" id="cb8"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fl">20</span><span class="op">/</span><span class="op">(</span><span class="fl">20</span><span class="op">+</span><span class="fl">39</span><span class="op">)</span> <span class="co"># expectation of beta(20,39)</span></span>
Expand All @@ -269,7 +269,7 @@ <h3>
<div class="sourceCode" id="cb9"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/r/stats/quantile.html">quantile</a></span><span class="op">(</span><span class="va">sample_from_posterior</span>, probs <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op">(</span><span class="fl">2.5</span><span class="op">/</span><span class="fl">100</span>, <span class="fl">97.5</span><span class="op">/</span><span class="fl">100</span><span class="op">)</span><span class="op">)</span></span>
<span><span class="co">## 2.5% 97.5% </span></span>
<span><span class="co">## 0.2294 0.4688</span></span></code></pre></div>
<span><span class="co">## 0.2298 0.4605</span></span></code></pre></div>
</div>
<div id="markovmodelmcmc" class="section level3" number="1.5.2">
<h3>
Expand Down Expand Up @@ -531,7 +531,7 @@ <h2>
</h2>
<ul>
<li>
<span class="citation">A. Gelman and Hill (<a href="references.html#ref-gelmanhill2006">2006</a>)</span>, <span class="citation">A. Gelman et al. (<a href="references.html#ref-gelman2020workflow">2020</a>)</span>, <span class="citation">McCarthy (<a href="references.html#ref-mccarthy2007">2007</a>)</span>, <span class="citation">McElreath (<a href="references.html#ref-mcelreathbook">2020</a>)</span>. <strong>Comment.</strong>
<span class="citation">Gelman and Hill (<a href="references.html#ref-gelmanhill2006">2006</a>)</span>, <span class="citation">Gelman et al. (<a href="references.html#ref-gelman2020workflow">2020</a>)</span>, <span class="citation">McCarthy (<a href="references.html#ref-mccarthy2007">2007</a>)</span>, <span class="citation">McElreath (<a href="references.html#ref-mcelreathbook">2020</a>)</span>. <strong>Comment.</strong>
</li>
</ul>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/dispersal.html
Original file line number Diff line number Diff line change
Expand Up @@ -35053,7 +35053,7 @@ <h2>
</h2>
<ul>
<li><p>Sites: <span class="citation">Arnason (<a href="references.html#ref-arnason1972">1972</a>)</span>, <span class="citation">Arnason (<a href="references.html#ref-arnason1973">1973</a>)</span>, <span class="citation">Schwarz, Schweigert, and Arnason (<a href="references.html#ref-SchwarzEtAl1993">1993</a>)</span>. States: <span class="citation">Nichols et al. (<a href="references.html#ref-NicholsEtAl1992">1992</a>)</span> (microtus and mass as state); <span class="citation">Nichols et al. (<a href="references.html#ref-NicholsEtAl1994">1994</a>)</span> (microtus and reproductive costs). For a review of multistate models, see <span class="citation">Lebreton et al. (<a href="references.html#ref-LebretonEtAl2009">2009</a>)</span>.</p></li>
<li><p>Uncertainty: Seminal paper by <span class="citation">R. Pradel (<a href="references.html#ref-Pradel2005">2005</a>)</span>. <span class="citation">Dupuis (<a href="references.html#ref-dupuis_bayesian_1995">1995</a>)</span> had a similar idea for the Arnason-Schwarz model. See also for a review <span class="citation">Gimenez et al. (<a href="references.html#ref-GimenezEtAl2012">2012</a>)</span>.</p></li>
<li><p>Uncertainty: Seminal paper by <span class="citation">Pradel (<a href="references.html#ref-pradel_multievent_2005">2005</a>)</span>. <span class="citation">Dupuis (<a href="references.html#ref-dupuis_bayesian_1995">1995</a>)</span> had a similar idea for the Arnason-Schwarz model. See also for a review <span class="citation">Gimenez et al. (<a href="references.html#ref-gimenez_estimating_2012">2012</a>)</span>.</p></li>
</ul>
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions docs/hmmcapturerecapture.html
Original file line number Diff line number Diff line change
Expand Up @@ -5345,7 +5345,7 @@ <h2>
<span> nchains <span class="op">=</span> <span class="va">n.chains</span><span class="op">)</span></span>
<span><span class="va">end_time</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/Sys.time.html">Sys.time</a></span><span class="op">(</span><span class="op">)</span></span>
<span><span class="va">end_time</span> <span class="op">-</span> <span class="va">start_time</span></span></code></pre></div>
<pre><code>## Time difference of 19.66 secs</code></pre>
<pre><code>## Time difference of 19.27 secs</code></pre>
<p>We can have a look to numerical summaries:</p>
<div class="sourceCode" id="cb120"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/pkg/MCMCvis/man/MCMCsummary.html">MCMCsummary</a></span><span class="op">(</span><span class="va">mcmc.output</span>, round <span class="op">=</span> <span class="fl">2</span><span class="op">)</span></span>
Expand Down Expand Up @@ -5627,7 +5627,7 @@ <h3>
<span><span class="co">## |-------------------------------------------------------|</span></span>
<span><span class="va">end_time</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/Sys.time.html">Sys.time</a></span><span class="op">(</span><span class="op">)</span></span>
<span><span class="va">end_time</span> <span class="op">-</span> <span class="va">start_time</span></span>
<span><span class="co">## Time difference of 17.61 secs</span></span></code></pre></div>
<span><span class="co">## Time difference of 18.79 secs</span></span></code></pre></div>
<p>The numerical summaries are similar to those we obtained with the complete likelihood, and effective samples sizes are larger denoting better mixing:</p>
<div class="sourceCode" id="cb127"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/pkg/MCMCvis/man/MCMCsummary.html">MCMCsummary</a></span><span class="op">(</span><span class="va">mcmc.output</span>, round <span class="op">=</span> <span class="fl">2</span><span class="op">)</span></span>
Expand Down Expand Up @@ -5763,7 +5763,7 @@ <h2>
<span><span class="co">## |-------------------------------------------------------|</span></span>
<span><span class="va">end_time</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/Sys.time.html">Sys.time</a></span><span class="op">(</span><span class="op">)</span></span>
<span><span class="va">end_time</span> <span class="op">-</span> <span class="va">start_time</span></span>
<span><span class="co">## Time difference of 17.55 secs</span></span>
<span><span class="co">## Time difference of 18.37 secs</span></span>
<span><span class="fu"><a href="https://rdrr.io/pkg/MCMCvis/man/MCMCsummary.html">MCMCsummary</a></span><span class="op">(</span><span class="va">mcmc.output</span>, round <span class="op">=</span> <span class="fl">2</span><span class="op">)</span></span>
<span><span class="co">## mean sd 2.5% 50% 97.5% Rhat n.eff</span></span>
<span><span class="co">## p 0.61 0.06 0.49 0.61 0.72 1 1453</span></span>
Expand Down
Loading

0 comments on commit e2fb494

Please sign in to comment.