2024-04-29
Network : jouvence
Password : Orford2021
Kim will give us a quick explanation about this
Website : https://bios2.github.io/hiermod/
On it, you will find the slides but also practical examples.
You will also find the course syllabus (in French)
Here is a brief overview of the course
3 credits course at Université de Sherbrooke
It is a pass or fail course…
So, if you get involved, ask questions, try, work… you will pass.
Basic knowldege of statistics
Statistical computing
We will not give an introduction to any programming language (e.g. R, Python, Julia).
We assume you know one and are conformtable using it… We are more comfortable in R, but can work with many other languages (but please no Fortran !)
Simple regression models
Simple hierarchical regression models
Complexe hierarchical regression models
We also want to learn about your research… and this might influence what we see during the course !
7h00 to 8h30 - Breakfast
8h30 to 10h00 - Lecture/Practice
10h00 to 10h30 - Break
10h30 to 12h30 - Lecture/Practice
12h30 to 13h30 - Lunch
13h30 to 15h00 - Lecture/Practice
15h30 to 16h00 - Break
16h00 to 17h00 - Lecture/Practice
17h00 to 17h30 - Let us know about your research !
17h30 to 18h00 - Break
18h00 to 19h00 - Supper
For this course, hierarchical models are regression models in which the parameters (the regression coefficients) are not defined by a single value but they are themselves given a probability distribution (Gelman and Hill 2007).
Hierarchical models are
Hierarchical models, as we will see them in this course, are also known under different names
We decided to use the term hierachical model to prevent confusions that sometimes arises in the litterature about random and fixed effects, which are terms commonly used when referring to mixed effect models.
Actually, random and fixed effects have multiple definitions, which leads to confusion.
Multiple Definition of fixed and random effects
(Kreft and De Leeuw 1998) Fixed effects are constant and random effect vary
(Searl et al. 1992) Effects are fixed if they are interesting in themselves or random if there is interest in the underlying population
(Green and Tukey 1960) When a sample exhausts the population, the corresponding variable is fixed; when the sample is a small (i.e., negligible) part of the population the corresponding variable is random
(Roy LaMotte 2014) If an effect is assumed to be a realized value of a random variable, it is called a random effect
(Robinson 1991) Fixed effects are estimated using least squares (or, more generally, maximum likelihood) and random effects are estimated with shrinkage.
Because of the different name used for hierarchial models, the history of this subfield of statistics is a little murky, but we know that a few important figures in statistics dabbed into this field, most notably
Fisher R.A. (1919). The Correlation between Relatives on the Supposition of Mendelian Inheritance. Transactions of the Royal Society of Edinburgh, 52 399–433.
lme4
, brms
, nlme
, glmmTMB
, MCMCglmm
, …MIXED
, HPMIXED
, GLMMIX
, …MixedModels.jl
What we will use
We will not use any of these software packages because under specific circumstances, what may seem like the same implementation of a model may lead to different answers and both can actually be right !
This is because the underlying model implemented in the software package may actually be slightly different.
Instead we will implement our own models from scratch using Stan.
A good portion of this course material is based on this book.
Everything is there but it can gets technical !
All of the practical aspect of the course will be done with R and Stan.
We strongly (!) encourage you to use RStudio and to start a project for the course.
# Package on CRAN
install.packages(c("vegan",
"palmerpenguins",
"tidybayes",
"tidyverse",
"posterior"))
# cmdstanr - One last important package
install.packages("cmdstanr",
repos = c("https://mc-stan.org/r-packages/",
getOption("repos")))
cmdstanr::check_cmdstan_toolchain()
cmdstanr::install_cmdstan(cores = 2) # If necessary