-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathindex.Rmd
79 lines (56 loc) · 5.16 KB
/
index.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
---
title: "Bayesian statistics with R"
#description: "A workshop with `R` and `Jags`"
site: distill::distill_website
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
# Learn more about creating websites with Distill at:
# https://rstudio.github.io/distill/website.html
# Learn more about publishing to GitHub Pages at:
# https://rstudio.github.io/distill/publish_website.html#github-pages
```
Who: [Olivier Gimenez](https://oliviergimenez.github.io/)
When:
Nov 21-Nov 28-Dec 5, 2024
~~March 22-23-25-26, 2021~~
~~Nov 25-Dec 2-Dec 9, 2021~~
~~April 11-12, 2022~~
~~Sept 22-23, 2022~~
~~Nov 24-Dec 1-Dec 8, 2022~~
~~Nov 23-Nov 30-Dec 7, 2023~~
Where:
~~Zoom~~
~~Biodiversity Ecology Evolution Master, Montpellier University~~
~~Collège Doctoral, Montpellier University~~
~~Collège Doctoral, Montpellier University~~
Biodiversity Ecology Evolution Master, Montpellier University
<!-- Syllabus: [click here](syllabus.html) -->
<!-- Upcoming lectures and assignments: [click here](schedule.html) -->
# Schedule
1. An introduction to Bayesian inference [[lecture](slides/motivations.pdf) | [practical 1](practicals/practical1.html) | [video](https://www.youtube.com/watch?v=uvU-TmEt8_M&t=0s)]
2. The likelihood [[lecture](slides/likelihood.pdf) | [practical 2](practicals/practical2.html) | [video](https://www.youtube.com/watch?v=uvU-TmEt8_M&t=3319s)]
3. Bayesian analyses by hand [[lecture](slides/example.pdf) | [video](https://www.youtube.com/watch?v=uvU-TmEt8_M&t=6280s)]
4. A detour to explore priors [[lecture](slides/priors.pdf) | [practical 3](practicals/practical3.html) | [practical 4](practicals/practical4.html)| [video](https://www.youtube.com/watch?v=uvU-TmEt8_M&t=8241s)]
5. Markov chains Monte Carlo methods (MCMC) [[lecture](slides/mcmc.pdf) | [video](https://www.youtube.com/watch?v=uvU-TmEt8_M&t=14907s)]
6. Bayesian analyses in `R` with the `Jags` software [[lecture](slides/jags.pdf) | [R script](Rscripts/jags_introduction_storks_example.R) | [practical 5](practicals/practical5.html) | [practical 6](practicals/practical6.html) | [video](https://www.youtube.com/watch?v=uvU-TmEt8_M&t=20405s)]
7. Contrast scientific hypotheses with model selection [[lecture](slides/modelselection.pdf) | [practical 7](practicals/practical7.html) | [video](https://www.youtube.com/watch?v=uvU-TmEt8_M&t=28947s)]
8. Heterogeneity and multilevel models (aka mixed models) [[lecture](slides/mixedmodels.pdf) | [R script](Rscripts/multilevel_models_plants_example.R) | [practical 8](practicals/practical8.html) | [practical 9](practicals/practical9.html) | [video](https://www.youtube.com/watch?v=uvU-TmEt8_M&t=29983s)]
# Learning objectives
* Try and demystify Bayesian statistics, and MCMC methods
* Make the difference between Bayesian and Frequentist analyses
* Understand the Methods section of a paper that does Bayesian stuff
* Run Bayesian analyses with `R` (in `Jags`)
# Requirements
* You need to have [`R`](https://cloud.r-project.org/) and [`RStudio`](https://rstudio.com/products/rstudio/download/#download) installed
* Download `Jags` from [sourceforge](http://sourceforge.net/projects/mcmc-jags/files/) and install it
* Install the following `R` packages: `tidyverse`, `here`, `lme4`, `visreg`, `lattice`, `brms` and `R2jags`. You can install them all at once by running the following code in the `R` command line:
```{r eval = FALSE, echo = TRUE}
install.packages(c("tidyverse", "R2jags", "here", "lme4", "visreg", "lattice", "brms"))
```
# Credits
Many slides are from [a workshop we used to run a loooong time ago](https://www.maths.ed.ac.uk/~rking33/Book-website/index.html) with Ruth King, Byron Morgan and Steve Brooks. I also re-used or adapted slides by [Richard McElreath](https://github.com/rmcelreath/statrethinking_winter2019), [Kerrie Mengersen](https://staff.qut.edu.au/staff/k.mengersen), [Francisco Rodriguez Sanchez](https://frodriguezsanchez.net/), [Jim Albert and Jingchen Hu](https://bayesball.github.io/BOOK/probability-a-measurement-of-uncertainty.html), [Tristan Marh](https://www.tjmahr.com/), [Jason Matthiopoulos](https://www.gla.ac.uk/researchinstitutes/bahcm/staff/jasonmatthiopoulos/), a paper by [Michael McCarthy and Pip Masters](https://besjournals.onlinelibrary.wiley.com/doi/full/10.1111/j.1365-2664.2005.01101.x), [Andrés Lopez-Sepulcre](https://www.lopez-sepulcre.com/) and [John Kruschke' book cover](https://sites.google.com/site/doingbayesiandataanalysis/). The sources for the images are [James Kulich](https://www.elmhurst.edu/blog/thomas-bayes/), Matt Buck, [xkcd](https://xkcd.com/1132/) and Mike West.
## Corrections {.appendix}
If you spot a typo or an error, find a bug, want to suggest changes, or have trouble running the code, please [file an issue](https://github.com/oliviergimenez/bayesian-stats-with-R/issues) or [get back to me](mailto:[email protected])
## Reuse {.appendix}
Text and figures are licensed under Creative Commons Attribution [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). Any computer code (R, HTML, CSS, etc.) in slides and worksheets, including in slide and worksheet sources, is also licensed under [MIT](https://github.com/oliviergimenez/bayesian-stats-with-R/blob/master/LICENSE.md).