2026-06-01
Network : XXX
Password : XXX
Be respectful of the environment
You are not allowed to pick wood from the forest
Fires can only be started in the fire pits with wood provided on site. Using the wood cost something, so please discuss this with me before starting a fire.
Fires can only be started if the fire risk from the SOPFEU at Mont St-Hilaire is Low or Moderate
If you start a fire when the fire risk is High, Very High or Extreme you will be evicted from the premises… and you will fail the course.
You have access to all trails in the natural reserve but you must remain on them at all time when you use them
Trails should not be used at after the sunsets
Smoking is permitted only in the parking lots
Candles are not allowed inside
Inside furniture must remaining inside
No music outside
Swimming in Lac Hertel is prohibited
Meals are provided but we must do the dishes after we eat
Cellphone reception is unreliable
There is a fix phone in every building : 9-1-1
It is recommended that you leave your room unlocked.
I will give you a code to make sure you can get out if you get locked into your room.
If you forget the code, after 3 tries the lock with be blocked
Alarm
If the alarm goes off… and I am not aware (!?), let me know I have the code to stop it.
Website : https://bios2.github.io/hiermod/
On it, you will find the slides but also practical examples.
You will also find the course syllabus
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
I will not give an introduction to any programming language (e.g. R, Python, Julia).
I assume you know one and are comfortable using it… I am more comfortable in R, but can work with many other languages (but please no Fortran !)
Simple regression models
Simple hierarchical regression models
Complex hierarchical regression models
I also want to learn about your research… and this might influence what I will present during the course !
7h30 to 8h30 - Breakfast
8h30 to 10h00 - Lecture/Practice
10h00 to 10h30 - Break
10h30 to 12h30 - Lecture/Practice
12h00 to 13h00 - 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 18h30 - Break
18h30 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 I 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.
A good portion of this course material is based on this book.
Everything is there but it can gets technical !
lme4, brms, nlme, glmmTMB, MCMCglmm, …MIXED, HPMIXED, GLMMIX, …MixedModels.jlWhat 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.
All of the practical aspect of the course will be done with R and Stan.
I strongly (!) encourage you to use RStudio and to start a project for the course.
# Package on CRAN
install.packages(c("vegan",
"palmerpenguins",
"posterior",
"bayesplot"))
# Run the next line if you already have rstan installed
# remove.packages(c("StanHeaders", "rstan"))
install.packages("rstan", repos = c('https://stan-dev.r-universe.dev', getOption("repos")))
example(stan_model, package = "rstan", run.dontrun = TRUE)