﻿ Highland Statistics Ltd

• Highland
•  Statistics Ltd

### Beginner's Guide to GLM and GLMM with R (2013).  Zuur AF, Hilbe JM and Ieno EN

CLICK TO ORDER BOOKS OR E-COPIES

This book presents Generalized Linear Models (GLM) and Generalized Linear Mixed Models (GLMM) based on both frequency-based and Bayesian concepts. Using ecological data from real-world studies, the text introduces the reader to the basics of GLM and mixed effects models, with demonstrations of binomial, gamma, Poisson, negative binomial regression, and beta and beta-binomial GLMs and GLMMs.

The book uses the functions glm, lmer, glmer, glmmADMB, and also JAGS from within R. JAGS results are compared with frequentist results.

R code to construct, fit, interpret, and comparatively evaluate models is provided at every stage. Otherwise challenging procedures are presented in a clear and comprehensible manner with each step of the modelling process explained in detail, and all code is provided so that it can be reproduced by the reader.

• Chapter 1 of Zero Inflated Models and Generalized Linear Mixed Models with R. (2012a) Zuur, Saveliev, Ieno.
• Chapter 1 of Beginner's Guide to Generalized Additive Models with R. (2012b) Zuur, AF.

See the Preface (and the text below) how to access the pdfs of these chapters.

## Keywords

• Introduction to GLM
• Poisson GLM and Negative binomial GLM for count data
• Binomial GLM for binary data
• Binomial GLM for proportional data
• Other distributions
• GLM applied to red squirrel data
• Bayesian approach – running the Poisson GLM
• Running JAGS via R
• Applying a negative binomial GLM in JAGS
• GLM applied to presence-absence Polychaeta data
• Model selection using AIC, DIC and BIC in jags
• Introduction to mixed effects models
• GLMM applied on honeybee pollination data
• Poisson GLMM using glmer and JAGS
• Negative binomial GLMM using glmmADMD and JAGS
•  GLMM with auto-regressive correlation
• GLMM for strictly positive data: biomass of rainforest trees
• gamma GLM using a frequentist approach
• Fitting a gamma GLM using JAGS
• Truncated Gaussian linear regression
• Tobit model in JAGS
• Tobit model with random effects in JAGS
• Binomial, beta-binomial, and beta GLMM applied to cheetah data

Click for

## Data sets and R code used in the book.

 All data sets used in the book are provided as *.txt or *.xls files. Right-mouse click on a data file and click on Save-As. R code for each chapter is password protected. The password is given on page vi in the preface of the book. See the paragraph "Data sets and R code used in this book" Support routines that we source in various chapters: HighstatLibV6.R  and  MCMCSupportHighstat.R. Just copy these two files in the working directory (use Save As) and type: source(file = "HighstatLibV6.R") source(file = "MCMCSupportHighstat.R") pdf file with some simple explanations on matrix notation Chapter Title Data sets R code* 1 Introduction to generalized linear models Baileyetal2008.xls WorkerBees.xls DrugMites.xls Chapter1.R.zip 2 Generalized linear modelling applied to red squirrel data RedSquirrels.txt Chapter2.R.zip 3 GLM applied to presence-absence polychaeta data PolychaetaV3.txt Chapter3.R.zip 4 Introduction to mixed effects models Spiders.txt Chapter4.R.zip 5 GLMM applied to honeybee pollination data pollen.txt Chapter5.R.zip 6 GLMM for strictly positive data: biomass of rainforest trees seedling.txt Chapter6.R.zip 7 Binomial, Beta-binomial, and Beta GLMM applied to Cheetah Data Cheetah.txt Chapter7.R.zip Join the Discussion board (for free) to ask questions on the book chapters.  Access Discussion board In case you have problems accessing the Discussion board: Instructions for accessing the Discussion board.

## Support chapters

Rather than reproducing the material on MCMC, we give the reader of this book electronic access to Chapter 1 of Zuur et al. (2012a), which contains an introduction to Bayesian statistics and MCMC. Chapter 1 of Zuur (2012b) provides an introduction to multiple linear regression, which is also prerequisite knowledge for this book. These two chapters are downloadable from:

Both chapters are password protected. The password is given on page vi in the preface. See the paragraph labelled "Chapter 1 of Zuur et al. (2012a) and Zuur (2012b)".