Book 2

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.

In this book we take the reader on an exciting voyage into the world of generalised additive mixed effects models (GAMM). Keywords are GAM, mgcv, gamm4, random effects, Poisson and negative binomial GAMM, gamma GAMM, binomial GAMM, NB-P models, GAMMs with generalised extreme value distributions, overdispersion, underdispersion, two-dimensional smoothers, zero-inflated GAMMs, spatial correlation, INLA, Markov chain Monte Carlo techniques, JAGS, and two-way nested GAMMs. The book includes three chapters on the analysis of zero-inflated data. Throughout the book frequentist approaches (gam, gamm, gamm4, lme4) are compared with Bayesian techniques (MCMC in JAGS and INLA). Datasets on squid, polar bears, coral reefs, ruddy turnstones, parasites in anchovy, Common Guillemots, harbour porpoises, forestry, brood parasitism, maximum cod length, and Common Scoters are used in case studies. The R code to construct, fit, interpret, and comparatively evaluate models is provided at every stage (either in the book or on the website for the book).

This book uses ecological datasets to discuss data exploration and visualisation tools. The authors also explain how to visualise the results of statistical models, an important aspect for publishing scientific papers. The book includes the R code needed to construct, visualise, and explore the main features of the data step by step.