# Beginner's Guide to

# Spatial, Temporal and Spatial-Temporal Ecological Data Analysis with R-INLA (2017)

# Zuur, Ieno, Saveliev

This book consists of two volumes.

In Volume I we explain how to apply linear regression models, generalised linear models (GLM), and generalised linear mixed-effects models (GLMM) to spatial, temporal, and spatial-temporal data. The models that will be employed use the Gaussian and gamma distributions for continuous data, the Poisson and negative binomial distributions for count data, the Bernoulli distribution for absence–presence data, and the binomial distribution for proportional data.

In Volume II we apply zero-inflated models and generalised additive (mixed-effects) models to spatial and spatial-temporal data. Volume II is entitled *Using GAMs and Zero-Inflated Models*, and will be available towards the end of 2018.

Volume I: Table of Contents

Volume I: Pdf of Chapter 1

Volume II: Table of Contents: Coming soon

Volume Ii: Pdf of Chapter 17: Coming soon

Volumes 1 and II are sold separately. Click here to order Volume I (or click on the 'Order Books or E-Books' at the top on the left-menu)

**June 2018: Volume II is nearly finished. One chapter to go!**

**Outline of Volume I**

In Chapter 2 we discuss an important topic: dependency. Ignoring this means that we have pseudoreplication. We present a series of examples and discuss how dependency can manifest itself.

We briefly discuss frequentist tools that are available for the analysis of temporal and spatial data in Chapters 3 and 4, and we will conclude that their application is rather limited, especially if non-Gaussian distributions are required. We will therefore consider alternative models, but these require Bayesian techniques.

In Chapter 5 we discuss linear mixed-effects models to analyse hierarchical (i.e. clustered or nested) data, and in Chapter 6 we outline how we add spatial and spatial-temporal dependency to regression models via spatial (and/or temporal) correlated random effects.

In Chapter 7 we introduce Bayesian analysis, Markov chain Monte Carlo techniques (MCMC), and Integrated Nested Laplace Approximation (INLA). INLA allows us to apply models to spatial, temporal, or spatial-temporal data.

In Chapters 8 through 16 we present a series of INLA examples. We start by applying linear regression and mixed-effects models in INLA (Chapters 8 and 9), followed by GLM examples in Chapter 10. In Chapters 11 through 13 we show how to apply GLM models on spatial data. In Chapter 14 we discuss time-series techniques and how to implement them in INLA. Finally, in Chapters 15 and 16 we analyse spatial-temporal models in INLA.

**Data and R code**

All data is freely available. All the R code is provided as well, except that a password is needed to open the zip files. The password is given in the Preface of the book (see page vi). In some chapters we are sourcing our support file HighstatLibV10.R.

- Chapter 1
- No data is used.
- No R code is used
- Sample chapter: Pages 1-4

- Chapter 2
- Data used: IrishPh.zip (had to zip it to avoid file format conversion). Snow.csv file (use Snow.xls in case you have trouble opening the csv file. In this case, convert the xls file to csv yourself).
- R code used: Chapter2.R.zip
- Sample pages: Pages 5-6

- Chapter 3:
- Data used: Ospreys.csv and Phenology_Data_Antarcticbirds_AFZ1.csv
- R code used: Chapter3.R.zip

- Chapter 4:
- Data used: IrishPh.txt see above
- R code used: Chapter4.R.zip

- Chapter 5:
- Data used: White_Stork_Growth_20112012_V2.csv
- R code used: Chapter5.R.zip
- Sample pages: Pages 61-62

- Chapter 6:
- Data used: No data files
- R code used: Chapter6.R.zip

- Chapter 7:
- Data used: IrishPh.txt see above
- R code used: Chapter7.R.zip
- Sample pages: Pages 83-84

- Chapter 8:
- Data used: Chimps.txt
- R code used: Chapter8.R.zip
- Sample pages: Pages 115-116

- Chapter 9:
- Data used: OTODATA.csv
- R code used: Chapter9.R.zip
- Sample pages: Pages 139-140

- Chapter 10:
- Data used: The files Turcoparasitos.txt, Crocodiles.txt, DrugsMites.txt and Procambarus.txt are in the file DataChapter10.zip.
- R code used: Chapter10.R.zip
- Sample pages: Pages 165-166 and page 182

- Chapter 11:
- Data used: none
- R code used: Chapter11.R.zip

- Chapter 12:
- Data used: See Chapter 2
- R code used: Chapter12.R.zip
- Sample pages: Pages 205-206, pages 209-219 and pages 230-231

- Chapter 13:

- Data used: LaPalma.txt
- R code used: Chapter13.R.zip and lapalmashapefile.zip
- Sample pages: Pages 239-240

- Chapter 14:
- Data used: sockeye.csv, PolarBearsV2.txt (zipped), Spermwhales.txt (zipped), HawaiiBirdsV2.txt and IceCoresV2.csv
- R code used: Chapter14.R.zip
- Sample pages: Pages 267-268

- Chapter 15:
- Data used: OrangedCrownedWarblers.txt (zipped)
- R code used: Chapter15.R.zip and spde-tutorial-functions.R (this file was taken from http://www.r-inla.org/)
- Sample pages: Pages 307-308, page 317 and page 326

- Chapter 16:
- Data used: CoralDisease.csv
- R code used: Chapter16.R.zip
- Sample pages: Pages 225-336 and page 346 (Dr. Christoph Kopp gave me some R code to convert the 76 spatial random fields into a mp4 video file)

R code and data for Volume II will be uploaded once this volume has been published.

Below you can add comments for this book. For questions, please use the Discussion board (see link in the menu).