Hierarchal And Mixed-effect models in R
Hierarchal And Mixed-effect models in R


Data can be nested or have a hierarchal structure. For example, cities exist within states or students attend the same school. However, what can be done to capture this structure? If this group structure is ignored, important group-level variability and structure can be lost. Conversely, aggregating data at a group-level can cause important individual-level variability to be lost.
One method for dealing with this structure is to model it. Mixed-effect, or hierarchical, models are a method for doing just this. This course will provide an introduction to mixed-effect models. Next, the course will show how to use mixed-effect models in R using the lme4 package using the lmer() and glmer() functions. Last, the course will describe how hierarchal models can be used to predict new groups.
Example datasets from USGS researchers will be used to illustrate how these models may be applied to environmental problems. First, a linear mixed-effect model will be used to explore how adult lamprey densities relate to the amount of DNA adults shed. Second, a generalized linear mixed-effect model will be used to examine the probability of detecting DNA from different densities of juveniles. Last, the course will present a case study of how hierarchal models may be used to predict missing groups using bighead and silver carp data.
Experience with linear models and generalized linear models in R
Basic familiarity with R and manipulating and plotting data with the Tidyverse

Learning Outcomes:
- Understand basics of mixed-effect models
- Know how to use lme4's `lmer()` and `glmer()` functions
- Awareness of advanced methods


Richard helps people to experience and understand their increasingly numerical world. As a Quantitive Ecologist with the USGS, he develops new quantitative methods for monitoring and guiding the control invasive species. He also functions as a consulting statistician within USGS and helps other scientists analyze and understand their data. He has worked on diverse datasets ranging from continent wide species distributions to examining pesticides in playa wetlands. After hours, he teaches SCUBA Diving as a NAUI Instructor.

He earned a PhD from Texas Tech where he developed Bayesian models to understand how pesticides impact population dynamics. He has been a user of R since 2007.

Open Data Science




Open Data Science
One Broadway
Cambridge, MA 02142

Privacy Settings
We use cookies to enhance your experience while using our website. If you are using our Services via a browser you can restrict, block or remove cookies through your web browser settings. We also use content and scripts from third parties that may use tracking technologies. You can selectively provide your consent below to allow such third party embeds. For complete information about the cookies we use, data we collect and how we process them, please check our Privacy Policy
Consent to display content from - Youtube
Consent to display content from - Vimeo
Google Maps
Consent to display content from - Google