Introduction to Bayesian data analysis for social and behavioural sciences using R and Stan (BDRS01)
This course may be suitable to anyone studying animal behaviour. https://www.psstatistics.com/course/introduction-to-bayesian-data-analysis-for-social-and-behavioural-sciences-using-r-and-stan-bdrs01/ This course will be delivered by Dr. Mark Andrews from the 3rd - 7th December 2018 in Glasgow City Centre. Course Overview: This course provides a general introduction to Bayesian data analysis using R and the Bayesian probabilistic programming language Stan. We begin with a gentle introduction to all the fundamental principles and concepts of Bayesian data analysis: the likelihood function, prior distributions, posterior distributions, high posterior density intervals, posterior predictive distributions, marginal likelihoods, Bayes factors, etc. We will do this using some simple probabilistic models that are easy to understand and easy to work with. We then proceed to more practically useful Bayesian analyses, starting with general linear models, followed by generalized linear models, including logistic regression and Poisson regression, followed by multilevel general and generalized linear models. For these analyses, we will use real world data sets, and carry out the analysis with Stan using the brms interface to Stan in R. With each example, we will explore general concepts such as model checking and improvement using posterior predictive checks, and model evaluation using cross-validation, WAIC, and Bayes factors. In the final part of the course, we will delve into some more advanced topics: understanding Markov Chain Monte Carlo in depth, Gaussian process regression, probabilistic mixture models. Course programme Monday 3rd – Classes from 09:30 to 17:30 Class 1: We will begin with a overview of what Bayesian data analysis is in essence and how it fits into statistics as it practiced generally. Our main point here will be that Bayesian data analysis is effectively an alternative school of statistics to the traditional approach, which is referred to variously as the classical, or sampling theory based, or frequentist based approach, rather than being a specialized or advanced statistics topic. However, there is no real necessity to see these two general approaches as being mutually exclusive and in direct competition, and a pragmatic blend of both approaches is entirely possible. Class 2: Introducing Bayes’ rule. Bayes’ rule can be described as a means to calculate the probability of causes from some known effects. As such, it can be used as a means for performing statistical inference. In this section of the course, we will work through some simple and intuitive calculations using Bayes’ rule. Ultimately, all of Bayesian data analysis is based on an application of these methods to more complex statistical models, and so understanding these simple cases of the application of Bayes’ rule can help provide a foundation for the more complex cases. Class 3: Bayesian inference in a simple statistical model. In this section, we will work through a classic statistical inference problem, namely inferring the number of red marbles in an urn of red and black marbles. This problem is easy to analyse completely with just the use of R, but yet allows us to delve into all the key concepts of all Bayesian statistics including the likelihood function, prior distributions, posterior distributions, maximum a posteriori estimation, high posterior density intervals, posterior predictive intervals, marginal likelihoods, Bayes factors, model evaluation of out-of-sample generalization. Tuesday 4th – Classes from 09:30 to 17:30 Class 4: Bayesian analysis of linear and normal models. Statistical models based on linear relationships and normal distribution are a mainstay of statistical analyses in general. They encompass models such as linear regression, Pearson’s correlation, t-tests, ANOVA, ANCOVA, and so on. In this section, we will describe how to do Bayesian analysis of linear and normal models, paying particular attention to Bayesian linear regression. One of the aims of this section is to identify some important and interesting parallels between Bayesian and classical or frequentist analyses. This shows how Bayesian and classical analyses can be seen as ultimately providing two different perspectives on the same problem. Class 5: The previous section provides a so-called analytical approach to linear and normal models. This is where we can calculate desired quantities and distributions by way of simple formulae. However, analytical approaches to Bayesian analyses are only possible in a relatively restricted set of cases. However, numerical methods, specifically Markov Chain Monte Carlo (MCMC) methods can be applied to virtually any Bayesian model. In this section, we will re-perform the analysis presented in the previous section but using MCMC methods. For this, we will use the brms package in R that provides an exceptionally easy to use interface to Stan. Class 6: This section continues the previous one, but explores a wider range of linear and normal models, namely the general linear models. These include models with multiple predictors, some or all of which may be categorical, and interactions between these predictors. We will use brms for all of these analyses. For all the examples covered here, we will use real world data-sets taken from a variety of different fields. Wednesday 5th – Classes from 09:30 to 17:30 Class 7: Bayesian generalized linear models. Generalized linear models include models such as logistic regression, including multinomial and ordinal logistic regression, Poisson regression, negative binomial regression, and other models. Again, for these analyses we will use the brms package and explore this wide range of models using real world data-sets. Class 8: Model evaluation and checking. A general topic in any analysis is to evaluate the suitability of the chosen or assumed statistical models in the analysis. This general topic incorporates hypothesis testing. In this section, we will discuss this topic in depth, paying particular attention to posterior predictive checks, cross-validation, information criteria, and Bayes factors. We will revisit many of the examples covered so far, and perform model checking and evaluation and hypothesis testing with the models that we used. Thursday 6th – Classes from 09:30 to 17:30 Class 8: Multilevel general and generalized linear models. In this section, we will cover the multilevel variants of the regression models, i.e. linear, logistic, Poisson etc, that we have covered so far. The topic of multilevel (or hierarchical) models is a major one, and multilevel models are widely used throughout the sciences. In general, multilevel models arise whenever data are correlated due to membership of a group (or group of groups, and so on). For example, if we have data concerning how socioeconomic status relates to educational achievement, the data might come from individual children. But these children are in separate schools, the schools are in separate cities, and the cities are in separate countries. Thus, the entire data-sets comprises groups (of groups etc) of data subsets, and there may be important variation across these subsets. The entire day is devoted to multilevel regression models. We will, as before, use a wide range of real-world data-sets, and move between linear, logistic, etc., models are we explore these analyses. We will pay particular attention to considering when and how to use varying slope and varying intercept models, and how to choose between maximal and minimal models. Here, we will cover model checking and evaluation in the same depth as with the previous models. Friday 7th – Classes from 09:30 to 16:00 Class 9: MCMC in depth. Although we will used MCMC methods extensively thus far, we will have hidden some of their technical details. As one approaches more advanced Bayesian topics, a deeper understanding of MCMC methods is required. In this section, we will begin by discussing simple Monte Carlo (MC) approaches like rejection sampling and importance sampling, and then proceed to Markov Chain Monte Carlo (MCMC) such as Gibbs sampling, Metropolis Hastings sampling, slice sampling, and Hamiltonian Monte Carlo. Class 10: Customized and bespoke statistical models. Thus far, we have use the brms package for almost all of our analyses. While brms is an excellent tool, in some cases, especially in more advanced analyses, it is not possible to use a pre-defined statistical model, e.g. a linear or logistic regression model, and it is necessary to develop customized and bespoke probabilistic models directly in the Stan language itself. In this final section of the course, we will delve into how to write Stan code directly. We’ll first explore the Stan code that brms creates, and we’ll learn how to modify this code. We will then write customized models that perform nonlinear regression using Gaussian processes and radial basis functions, and also finite mixture models. Through these examples, we will learn how to write and analyse any type of custom statistical model and thus produce models that are well suited to whatever specialized problem we are working on. Email oliverhoo...@psstatistics.com Check out our sister sites, www.PRstatistics.com (Ecology and Life Sciences) www.PRinformatics.com (Bioinformatics and data science) www.PSstatistics.com (Behaviour and cognition) 1. November 5th – 8th 2018 PHYLOGENETIC COMPARATIVE METHODS FOR STUDYING DIVERSIFICATION AND PHENOTYPIC EVOLUTION (PCME01) Glasgow, Scotland, Dr. Antigoni Kaliontzopoulou https://www.prstatistics.com/course/phylogenetic-comparative-methods-for-studying-diversification-and-phenotypic-evolution-pcme01/ 2. November 19th – 23rd 2018 STRUCTUAL EQUATION MODELLING FOR ECOLOGISTS AND EVOLUTIONARY BIOLOGISTS (SEMR02) Glasgow, Scotland, Dr. Jonathan Lefcheck https://www.prstatistics.com/course/structural-equation-modelling-for-ecologists-and-evolutionary-biologists-semr02/ 3. November 26th – 30th 2018 FUNCTIONAL ECOLOGY FROM ORGANISM TO ECOSYSTEM: THEORY AND COMPUTATION (FEER01) Glasgow, Scotland, Dr. Francesco de Bello, Dr. Lars Götzenberger, Dr. Carlos Carmona http://www.prstatistics.com/course/functional-ecology-from-organism-to-ecosystem-theory-and-computation-feer01/ 4. December 3rd – 7th 2018 INTRODUCTION TO BAYESIAN DATA ANALYSIS FOR SOCIAL AND BEHAVIOURAL SCIENCES USING R AND STAN (BDRS01) Glasgow, Dr. Mark Andrews https://www.psstatistics.com/course/introduction-to-bayesian-data-analysis-for-social-and-behavioural-sciences-using-r-and-stan-bdrs01/ 5. January 21st – 25th 2019 STATISTICAL MODELLING OF TIME-TO-EVENT DATA USING SURVIVAL ANALYSIS: AN INTRODUCTION FOR ANIMAL BEHAVIOURISTS, ECOLOGISTS AND EVOLUTIONARY BIOLOGISTS (TTED01) Glasgow, Scotland, Dr. Will Hoppitt https://www.psstatistics.com/course/statistical-modelling-of-time-to-event-data-using-survival-analysis-tted01/ 6. January 21st – 25th 2019 ADVANCING IN STATISTICAL MODELLING USING R (ADVR08) Glasgow, Scotland, Dr. Luc Bussiere, Dr. Tom Houslay http://www.prstatistics.com/course/advancing-statistical-modelling-using-r-advr08/ 7. January 28th– February 1st 2019 AQUATIC ACOUSTIC TELEMETRY DATA ANALYSIS AND SURVEY DESIGN Glasgow, Scotland, VEMCO staff and affiliates https://www.prstatistics.com/course/aquatic-acoustic-telemetry-data-analysis-atda01/ 8. February 4th – 8th 2019 DESIGNING RELIABLE AND EFFICIENT EXPERIMENTS FOR SOCIAL SCIENCES (DRES01) Glasgow, Scotland, Dr. Daniel Lakens https://www.psstatistics.com/course/designing-reliable-and-effecient-experiments-for-social-sciences-dres01/ 9. February 11th – 15th 2019 REPRODUCIBLE DATA SCIENCE FOR POPULATION GENETICS Glasgow, Scotland, Dr. Thibaut Jombart, Dr. Zhain Kamvar https://www.prstatistics.com/course/reproducible-data-science-for-population-genetics-rdpg02/ 10. 25th February – 1st March 2019 MOVEMENT ECOLOGY (MOVE02) Margam Discovery Centre, Wales, Dr. Luca Borger, Prof. Ronny Wilson, Dr Jonathan Potts https://www.prstatistics.com/course/movement-ecology-move02/ 11. March 4th – 8th 2019 BIOACOUSTICS FOR ECOLOGISTS: HARDWARE, SURVEY DESIGN AND DATA ANALYSIS (BIAC01) Glasgow, Scotland, Dr. Paul Howden-Leach https://www.prstatistics.com/course/bioacoustics-for-ecologists-hardware-survey-design-and-data-analysis-biac01/ 12. March 11th – 15th 2019 ECOLOGICAL NICHE MODELLING USING R (ENMR03) Glasgow, Scotland, Dr. Neftali Sillero http://www.prstatistics.com/course/ecological-niche-modelling-using-r-enmr03/ 13. March 18th – 22nd 2019 INTRODUCTION TO STATISTICS AND R FOR EVERYONE (IRFE01) Crete, GREECE, Dr Aristides (Aris) Moustakas https://www.prstatistics.com/course/introduction-to-statistics-and-r-for-anyone-irfe01/ 14. March 25th – 29th 2019 LANDSCAPE GENETIC DATA ANALYSIS USING R (LNDG03) Glasgow, Scotland, Prof. Rodney Dyer http://www.prstatistics.com/course/landscape-genetic-data-analysis-using-r-lndg03/ 15. April 1st – 5th 2019 INTRODUCTION TO STATISTICAL MODELLING FOR PSYCHOLOGISTS USING R (IPSY01) Glasgow, Scotland, Dr. Dale Barr, Dr Luc Bussierre http://www.psstatistics.com/course/introduction-to-statistics-using-r-for-psychologists-ipsy02/ 16. April 1st – 5th 2019 INDIVIDUAL BASED MODELS FOR ECOLOGSITS (IBME01) Glasgow, Scotland, Dr Aristides (Aris) Moustakas Link to follow 17. April 8th – 12th 2019 MACHINE LEARNING (MLUR01) Glasgow, Scotland, Dr Aristides (Aris) Moustakas https://www.prstatistics.com/course/machine-learning-using-r-mlur01/ 18. April 29th – May 3rd 2019 COMPARATIVE GENOMICS (CMGN01) Glasgow, Scotland, Dr. Fritz Sedlazeck, Dr. Matthias Weissensteiner https://www.prinformatics.com/course/comparative-genomics-cmgn01/ 19. May 6th – 10th 2019 NETWORK ANAYLSIS FOR ECOLOGISTS USING R (NTWA03) Myuna Bay, AUSTRALIA, Dr. Marco Scotti www.prstatistics.com/course/network-analysis-ecologists-ntwa03/ 20. May 16th – 18th 2019 (please note this a 3-day course from Thursday to Saturday) AQUATIC MOVEMENT ECOLOGY USING R (AMER01) Myuna Bay, AUSTRALIA, Dr. Ross Dwyer, Dr. Vinay Udyawer Link to follow 21. May 16th – 19th 2019 (please note this a 4-day course from Thursday to Monday) INTRODUCTION TO R FOR EVERYONE (IRFE02) Myuna Bay, AUSTRALIA, Dr Aristides (Aris) Moustakas https://www.prstatistics.com/course/introduction-to-statistics-and-r-for-anyone-irfe02/ 22. May 20th – 24th 2019 MODEL BASE MULTIVARIATE ANALYSIS OF ABUNDANCE DATA USING R (MBMV03) Myuna Bay, AUSTRALIA, Prof. David Warton https://www.prstatistics.com/course/model-based-multivariate-analysis-of-abundance-data-using-r-mbmv03/ 23. May 21st – 24th 2019 STATISTICAL TOOL BOX FOR ECOLOGISTS (STKE01) Myuna Bay, AUSTRALIA, Dr Aristides (Aris) Moustakas https://www.prstatistics.com/course/statistical-toolkit-for-ecologists-stke01/ 24. June 10th – 14th 2019 STABLE ISOTOPE MIXING MODELS USING SIAR, SIBER AND MIXSIAR (SIMM04) Glasgow, Scotland, Dr. Andrew Parnell, Dr. Andrew Jackson www.prstatistics.com/course/stable-isotope-mixing-models-using-r-simm04/ 25. June 17th – 21st 2019 SPATIAL MODELLING AND ANALYSIS OF ADAPTIVE GENOMIC VARIATION (SPGN01) Glasgow, Dr. Matt Fitzpatrick https://www.prstatistics.com/course/spatial-modelling-and-analysis-of-adaptive-genomic-variation-spgn01/ 26. June 17th – 21st 2019 INTRODUCTION TO PYTHON FOR BIOLOGISTS (IPYB06) Glasgow, Scotland, Dr. Martin Jones http://www.prinformatics.com/course/introduction-to-python-for-biologists-ipyb06/ 27. June 24th – 28th 2019 ADVANCED PYTHON FOR BIOLOGISTS (APYB03) Glasgow, Scotland, Dr. Martin Jones www.prinformatics.com/course/advanced-python-biologists-apyb03/ 28. July 1st – 5th 2019 DATA VISUALISATION AND MANIPULATION USING PYTHON (DVMP01) Glasgow, Scotland, Dr. Martin Jones http://www.prinformatics.com/course/data-visualisation-and-manipulation-using-python-dvmp01/ 29. September 16th – 20th 2019 R PACKAGE DESIGN AND DEVELOPMENT AND REPRODUCIBLE DATA SCIENCE FOR BIOLOGISTS (RPKG01) Glasgow, Scotland, Dr. Cory Merow, Dr. Andy Rominger https://www.prstatistics.com/course/r-package-design-and-development-and-reproducible-data-science-for-biologists-rpkg01/ 30. September 30th – October 4th 2019 GEOMETRIC MORPHOMETRICS USING R (GMMR02) Glasgow, Scotland, Prof. Dean Adams, Prof. Michael Collyer, Dr. Antigoni Kaliontzopoulou http://www.prstatistics.com/course/geometric-morphometrics-using-r-gmmr02/ 31. October 7th – 11th 2019 CONSERVATION PLANNING USING PRIORITIZR : FROM THEORY TO PRACTICE (PRTZ01) Crete, GREECE, Dr Richard Schuster and Nina Morell https://www.prstatistics.com/course/conservation-planning-using-prioritizr-from-theory-to-practice-prtz01/ 32. October 21st – 25th 2019 A COMPLETE GUIDE TO MIXED MODELS (INCLUDING TEMPORAL AND SPATIAL AUTOCORRELATION) (MMTS01) Crete, GREECE, Dr Aristides (Aris) Moustakas https://www.prstatistics.com/course/a-complete-guide-to-mixed-models-including-temporal-and-spatial-autocorrelation-mmts01/