**Chapter 1 Working with Spatial Data**

*1.1 Introduction*

*1.2 Analysis of Spatial data*

1.2.1 Types of spatial data

1.2.2 The components of spatial data

1.2.3 Topics covered in the text

*1.3 The data sets analyzed in this book*

1.3.1 Data Set 1: yellow-billed cuckoo habitat

1.3.2. Data Set 2: Environmental characteristics of oak woodlands

1.3.3 Data Set 3: Uruguayan rice farmers

1.3.4 Data Set 4: Factors underlying yield in two fields

1.3.5 Comparing the data sets

*1.4 Further reading*

**Chapter 2 The R Programming Environment**

*2.1 Introduction*

2.1.1 Introduction to R

2.1.2 Setting yourself up to use this book

*2.2 R basics*

*2.3 Programming concepts*

2.3.1 Looping and branching

2.3.2 Functional programming

*2.4 Handling Data in R*

2.4.1 Data structures in R

2.4.2 Basic data input and output

2.4.3 Spatial data structures

*2.5 Writing functions in R*

*2.6 Graphics in R*

2.6.1 Traditional graphics in R; attribute data

2.6.2 Traditional graphics in R; spatial data

2.6.3 Trellis graphics in R, attribute data

2.6.4 Trellis graphics in R, spatial data

2.6.5 Using color in R

*2.7 Other software packages*

*2.8 Further reading*

*2.9 Exercises*

**Chapter 3 Statistical Properties of Spatially
Autocorrelated Data**

*3.1 Introduction*

*3.2 Components of a spatial random process*

3.2.1 Spatial trends in data

3.2.2 Stationarity

*3.3 Monte Carlo simulation*

*3.4 A Review of hypothesis and significance testing*

*3.5 Modeling spatial autocorrelation*

3.5.1 Monte Carlo simulation of time series

3.5.2 Modeling spatial contiguity

3.5.3 Modeling spatial association in R

*3.6 Application to field data*

*3.7 Further reading*

*3.8 Exercises*

**Chapter 4 Measures of Spatial Autocorrelation**

*4.1 Introduction*

*4.2 Preliminary considerations*

4.2.1 Measurement scale

4.2.2 Randomization assumptions

4.2.3 Testing the null hypothesis

*4.3 Join - count statistics*

*4.4 Moran's I and Geary's c*

*4.5 Measures of autocorrelation structure*

4.5.1 The Moran correlogram

4.5.2 The Moran Scatterplot

4.5.3 Local measures of autocorrelation

4.5.4 Geographically weighted regression

*4.6 Measuring autocorrelation of spatially continuous data*

4.6.1 The variogram

4.6.2 The covariogram and the correlogram

*4.7 Further reading*

*4.8 Exercises*

**Chapter 5 Sampling and Data Collection**

*5.1 Introduction*

*5.2 Preliminary considerations*

5.2.1 The artificial population

5.2.2 Accuracy, bias, and precision

5.2.3 Comparison procedures

*5.3 Developing the sampling patterns*

5.3.1 Random sampling

5.3.2 Geographically stratified sampling

5.3.3 Sampling on a regular grid

5.3.4 Stratification based on a covariate

5.3.5 Cluster sampling

*5.4 Methods for variogram estimation*

*5.5 Estimating the sample size*

*5.6 Sampling for thematic mapping*

*5.7 Design-based and model-based sampling*

*5.8 Further reading*

*5. 9 Exercises*

**Chapter 6 Preparing Spatial Data for Analysis**

*6.1. Introduction*

*6.2 Quality of attribute data*

6.2.1 Dealing with outliers and contaminants

6.2.2 Quality of ecological survey data

6.2.3 Quality of automatically recorded data

*6.3 Spatial interpolation procedures*

6.3.1 Inverse weighted distance interpolation

6.3.2 Kriging interpolation

6.3.3 Cokriging interpolation

*6.4 Spatial rectification and alignment of data*

6.4.1 Definitions of scale related processes

6.4.2 Change of coverage

6.4.3 Change of support

*6.5 Further reading*

*6.6 Exercises*

**Chapter 7 Preliminary Exploration of Spatial Data**

*7.1 Introduction*

*7.2 Data Set 1*

*7.3 Data Set 2*

*7.4 Data Set 3*

*7.5 Data Set 4*

*7.6 Further reading*

*7.7 Exercises*

**Chapter 8 Multivariate Methods for Spatial Data Exploration**

*8.1 Introduction*

*8.2 Principal components analysis*

8.2.1 Introduction to Principal Components Analysis

8.2.2 Principal components analysis of Data Set 2

8.2.3 Application to Data Set 4, Field 1

*8.3 Classification and regression trees (a.k.a. recursive partitioning)*

8.3.1 Introduction to the method

8.3.2 The mathematics of recursive partitioning

8.3.3 Exploratory analysis of Data Set 2 with regression trees

8.3.4 Exploratory analysis of Data Set 3 with recursive partitioning

8.3.5 Exploratory analysis of Field 4.1 with recursive partitioning

*8.4 Random forest*

8.4.1 Introduction to random forest

8.4.2 Application to Data Set 2

*8.5 Further reading*

*8.6 Exercises*

**Chapter 9 Spatial Data Exploration via Multiple Regression**

*9.1 Introduction*

*9.2 Multiple Linear Regression*

9.2.1 The many perils of model selection

9.2.2 Multicollinearity, added variable plots and partial
residual plots

9.2.3 A cautious approach model selection as an exploratory tool

*9.3 Building a multiple regression model for Field 4.1*

*9.4 Generalized linear models*

9.4.1 Introduction to generalized linear models

9.4.2 Multiple logistic regression model for Data Set 2

9.4.3 Logistic regression model of count data for Data Set 1

9.4.4 Analysis of the counts of Data Set 1: zero-inflated
Poisson data

*9.5 Further reading*

*9.6 Exercises*

**Chapter 10 Variance Estimation, the Effective
Sample Size, and the Bootstrap**

*10.1. Introduction*

*10.2 Bootstrap estimation of the standard error*

*10.3 Bootstrapping time series data*

10.3.1 The problem with correlated data

10.3.2 The block bootstrap

10.3.3 The parametric bootstrap

*10.4 Bootstrapping spatial data*

10.4.1 The spatial block bootstrap

10.4.2 The parametric spatial bootstrap

10.4.3 Power of the tests

*10.5 Application to the EM38 data*

*10.6 Further reading*

*10.7 Exercises*

**Chapter 11 Measures of Bivariate Association
between Two Spatial Variables**

*11.1 Introduction*

*11.2 Estimating and testing the correlation coefficient*

11.2.1 The correlation coefficient

11.2.2 The Clifford et al. (1989) correction

11.2.3 The bootstrap variance estimate

11.2.4 Application to the example problem

*11.3 Contingency tables*

11.3.1 Large sample size contingency tables

11.3.2 Small sample size contingency tables

*11.4 The Mantel and partial Mantel Statistics*

11.4.1 The Mantel statistic

11.4.2 The partial Mantel test

*11.5 The modifiable areal unit problem and the ecological fallacy*

11.5.1 The modifiable areal unit problem

11.5.2 The ecological fallacy

*11.6 Further reading*

*11.7 Exercises*

**Chapter 12 The Mixed Model**

*12.1 Introduction*

*12.2 Basic properties of the mixed model*

*12.3 Application to Data Set 3*

*12.4 Incorporating spatial autocorrelation*

*12.5 Generalized least squares*

*12.6 Spatial logistic regression*

12.6.1 Upscaling Data Set 2 in the Coast Range

12.6.2 The incorporation of spatial autocorrelation

*12.7 Further Reading*

*12.8 Exercises*

**Chapter 13 Regression Models for Spatially
Autocorrelated Data**

*13.1 Introduction*

*13.2 Detecting spatial autocorrelation in a regression model*

*13.3 Models for spatial processes*

13.3.1 The spatial lag model

13.3.2 The spatial error model

*13.4 Determining the appropriate regression model*

13.4.1 Formulation of the problem

13.4.2 The Lagrange multiplier test

*13.5 Fitting the spatial lag and spatial error models*

*13.6 The conditional autoregressive model*

*13.7 Application of SAR and CAR models to Field data*

13.7.1 Fitting the data

13.7.2 Comparison of the mixed model and spatial autoregression

*13.8 The autologistic model for binary data*

*13.9 Further reading*

*13.10 Exercises*

**Chapter 14 Bayesian Analysis of Spatially
Autocorrelated Data**

*14.1 Introduction*

*14.2 Markov chain Monte Carlo methods*

*14.3 Introduction to WinBUGS*

14.3.1 WinBUGS basics

14.3.2 WinBUGS diagnostics

14.3.3 Introduction to R2WinBUGS

14.3.4 Generalized linear models in WinBUGS

*14.4 Hierarchical models*

*14.5 Incorporation of spatial effects*

14.5.1 Spatial effects in the linear model

14.5.2 Application to Data Set 3

*14.6 Further reading*

*14.7 Exercises*

**Chapter 15 Analysis of Spatiotemporal Data**

*15.1 Introduction*

*15.2 Spatiotemporal cluster analysis*

*15.3 Factors underlying spatiotemporal yield clusters*

*15.4 Bayesian spatiotemporal analysis*

15.4.1 Introduction to Bayesian updating

15.4.2 Application of Bayesian updating to Data Set 3

*15.5 Other approaches to spatiotemporal modeling*

15.5.1 Models for dispersing populations

15.5.2 State and transition models

*15.6 Further reading*

*15.7 Exercises*

**Chapter 16 Analysis of Data from Controlled Experiments**

*16.1 Introduction*

*16.2 Classical analysis of variance*

*16.3 The comparison of methods*

16.3.1 The comparison statistics

16.3.2 The Papadakis nearest neighbor method

16.3.3 The trend method

16.3.4 The "correlated errors" method

16.3.5 Published comparisons of the methods

*16.4 Pseudoreplicated data and the effective sample size.*

16.4.1 Pseudoreplicated comparisons

16.4.2 Calculation of the effective sample size

16.4.3 Application to field data

*16.5 Further reading*

*16.6 Exercises*

**Chapter 17 Assembling Conclusions**

*17.1 Introduction*

*17.2 Data Set 1*

*17.3 Data Set 2*

*17.4 Data Set 3*

*17.5 Data Set 4*

*17.6 Conclusions*

**Appendix A Review of Mathematical Concepts**

*A.1 Matrix theory and linear algebra*

A.1.1 Matrix algebra

A.1.2 Random vectors and matrices

A.1.3 Eigenvectors, eigenvalues, and projections

*A.2 Linear regression*

A.2.1 Basic regression theory

A.2.2 The matrix representation of linear regression

A.2.3 Regression diagnostics

A.2.4 Regression and causality

*A.3 Nested models and the general linear test*

*A.4 The method of Lagrange multipliers*

*A.5 The maximum likelihood method*

A.5.1 The likelihood function

A.5.2 The likelihood ratio test

A.5.3. Application of maximum likelihood to linear regression

A.5.4 Maximum likelihood and restricted maximum likelihood.

*A.6 Change of variables of a probability density*

**Appendix B: The Data Sets**

*B.1 Data Set 1*

B.1.1 General description

B.1.2 Land cover mapping from 1997 aerial photography

B.1.4 Habitat patches

B.1.5 The creation of the full set of explanatory variables

B.1.6 Yellow-billed cuckoo observation points

*B. 2 Data Set 2*

*B.3 Data Set 3*

*B.4 Data Set 4*

**Appendix C An R Thesaurus**