Bayesian analysis
All about that Bayes
Objective
Here we will consider an alternative to the null hypothesis significance testing paradigm (NHST) that we have been using in class. The goal is to introduce you to Bayesian analysis. By the end of the module, you should be able to
- carry out analyses we have used linear models to address from a Bayesian perspective
- define credible interval and compare it to confidence interval
- define posterior distributions and discuss why sampling methods are sometimes required to describe them
Background reading
Course notes links for background reading also contain code used to produce R output used in slides.
Lecture slides (click to open in Google slides!)
Connected assignment(click here)
Using these skills and applying concepts correctly to interpret data sets may seem easy when you read about them or listen during class, but practice is key to ensuring you understand the material. Practice problems are provided for each lesson. The link above points you to the appropriate link in the course notes. You can make a copy (technically a fork, since you can’t directly edit it) of the entire course notes website in github @ https://github.com/jsgosnell/cuny_biostats_book and work from there. The benefit is this allows you to see updates to the site (if you sync your fork). The downside is you have to work interactively or build the entire site when you render a changed file. This is doable but may take more time than students need (and may lead to merge issues!).
Alternatively,your instructor may use a different delivery method (like github classroom) or provide alternative problems.
In general you should only work edit .qmd files! Everything/anything else is produced during the session and should not be edited. All files can be uploaded to github though.
Solutions are also provided for all problems via the course notes, but try them before you look at the answers!
Extra material
- P-values
- history
- https://www.tandfonline.com/doi/full/10.1080/00031305.2018.1537891
- https://www.frontiersin.org/journals/psychology/articles/10.3389/fpsyg.2015.00223/full
- Issues
- https://www.nature.com/articles/d41586-019-00857-9
- https://www.nature.com/articles/d41586-019-00874-8
- https://www.vox.com/science-and-health/2018/9/19/17879102/brian-wansink-cornell-food-brand-lab-retractions-jama
- history
- Bayesian comparison
- Ghosts!
- https://www.semanticscholar.org/paper/Feeling-the-future%3A-experimental-evidence-for-on-Bem/053428187307008d657c815c6b2dff7130750cb9?p2df
- https://www.ejwagenmakers.com/2011/Bem6.pdf https://www.psychologytoday.com/us/blog/one-among-many/201101/bem-bayes-and-the-limits-statistical-inference
- Monty Hall
- Sampling
- https://towardsdatascience.com/a-zero-math-introduction-to-markov-chain-monte-carlo-methods-dcba889e0c50
- Approaches
- https://link.springer.com/article/10.3758/PBR.16.2.225
- https://bloomington.iu.edu/~kruschke/BEST/
- https://www.ejwagenmakers.com/2011/WetzelsEtAl2011_855.pdf
- https://www.flutterbys.com.au/stats/tut/tut7.4b.html
- https://www.sumsar.net/blog/2014/10/tiny-data-and-the-socks-of-karl-broman/
- https://statmodeling.stat.columbia.edu/2016/08/22/bayesian-inference-completely-solves-the-multiple-comparisons-problem/
- stan
- https://mc-stan.org/users/
- https://jrnold.github.io/bugs-examples-in-stan/index.html
- https://strengejacke.wordpress.com/2018/06/06/r-functions-for-bayesian-model-statistics-and-summaries-rstats-stan-brms/
- brms
- https://www.r-bloggers.com/2022/04/bayesian-analyses-made-easy-glmms-in-r-package-brms/
- Ghosts!