13: Spatial Statistics

General Overview

Dean Adams, Iowa State University

Overview

Geography in Biological Data

Point Patterns

Point Patterns

Point Patterns: Aggregation Index

see Clark and Evans (1954: Ecology) for description of obtaining expected values (based on bivariate random data: expected value obtained analytically: see their Appendix)

Point Patterns: Aggregation Index

see Clark and Evans (1954: Ecology) for description of obtaining expected values (based on bivariate random data: expected value obtained analytically: see their Appendix)

Point Patterns: Ripley’s K

\[\small{K=\frac{E(pts)}{\lambda}}\]

where \(\small{E(pts)}\) is the the expected number of points in some area, and \(\small\lambda\) is the density of points

Point Patterns: Ripley’s K

\[\small{K=\frac{E(pts)}{\lambda}}\]

where \(\small{E(pts)}\) is the the expected number of points in some area, and \(\small\lambda\) is the density of points

Point Patterns: Area Partition Methods

Point Patterns: Area Partition Methods

Note: There are many other dispersion indices (see Dale, 1999; Rosenberg, 2003)

Point Patterns: Distance Methods

When Traits are Influenced by Spatial Gradients

Spatial Autocorrelation: General Considerations

Association with Geography

Association with Geography

Mantel Test: Example

mantel(dist(g), dist(y), permutations = 999)  
## 
## Mantel statistic based on Pearson's product-moment correlation 
## 
## Call:
## mantel(xdis = dist(g), ydis = dist(y), permutations = 999) 
## 
## Mantel statistic r: 0.4739 
##       Significance: 0.001 
## 
## Upper quantiles of permutations (null model):
##    90%    95%  97.5%    99% 
## 0.0624 0.0869 0.1008 0.1247 
## Permutation: free
## Number of permutations: 999
plot(dist(g), dist(y))

Mantel Tests: Basic Design

Accounting for Geography: Partial Mantel Tests

mantel.partial(dist(t), dist(y), dist(g), permutations = 999)
## 
## Partial Mantel statistic based on Pearson's product-moment correlation 
## 
## Call:
## mantel.partial(xdis = dist(t), ydis = dist(y), zdis = dist(g),      permutations = 999) 
## 
## Mantel statistic r: 0.02606 
##       Significance: 0.111 
## 
## Upper quantiles of permutations (null model):
##    90%    95%  97.5%    99% 
## 0.0273 0.0436 0.0532 0.0700 
## Permutation: free
## Number of permutations: 999

Mantel Tests: Cautions

See: Oden and Sokal 1992. J. Classif.; Legendre 2000. J. Stat. Comp. Simul.; Harmon and Glor 2010. Evolution; Guillot & Rousset 2013. Methods Ecol. Evol.

Spatial Autocorrelation: Digging Deeper

Spatial Autocorrelation: Digging Deeper

\[\small\mathbf{Y}=\mathbf{X{\hat{\beta}}+\epsilon}\] Here, \(\small\epsilon\) is not iid, as these assumptions are not met (there is SAC). Thus, we should model \(\small\epsilon\) something like: \(\small\sim\mathcal{N}(0,\mathbf{\Sigma})\). where \(\small\mathbf{\Sigma}\) embodies the expected spatial covariation between subjects.

Spatial Autocorrelation: Digging Deeper

\[\small\mathbf{Y}=\mathbf{X{\hat{\beta}}+\epsilon}\] Here, \(\small\epsilon\) is not iid, as these assumptions are not met (there is SAC). Thus, we should model \(\small\epsilon\) something like: \(\small\sim\mathcal{N}(0,\mathbf{\Sigma})\). where \(\small\mathbf{\Sigma}\) embodies the expected spatial covariation between subjects.

Spatial Autocorrelation

Spatial Autocorrelation

Connectivity (W): Neighbors and Distances

Measuring Autocorrelation: Join Counts

Measuring Autocorrelation: Continuous Data

Measuring Autocorrelation: Continuous Data

Note: Semivariograms are based on unstandardized Geary’s c

Spatial Autocorrelation: Semivariogram

The semivarigram for the simulated data, and with a Gaussian model

Spatial Autocorrelation: Example

Measuring Spatial Autocorrelation: Importance of Model

Modeling Spatial Non-Independence

\[\small\mathbf{Y}=\mathbf{X{\hat{\beta}}+\epsilon}\]

Here, \(\small\epsilon\) is not iid, as these assumptions are not met (there is SAC). Thus, we should model \(\small\epsilon\) something like: \(\small\sim\mathcal{N}(0,\mathbf{\Sigma})\). where \(\small\mathbf{\Sigma}\) embodies the expected spatial covariation between subjects.

Thus, given an estimate \(\small\mathbf{\Sigma}\), we can fit the model as: \(\small\hat{\mathbf{\beta }}=\left ( \mathbf{X}^{T} \mathbf{\Sigma}^{-1} \mathbf{X}\right )^{-1}\left ( \mathbf{X}^{T} \mathbf{\Sigma}^{-1}\mathbf{Y}\right )\)

The question is: what is \(\small\mathbf{\Sigma}\)?

Modeling Spatial Non-Independence

\[\small\mathbf{Y}=\mathbf{X{\hat{\beta}}+\epsilon}\]

Here, \(\small\epsilon\) is not iid, as these assumptions are not met (there is SAC). Thus, we should model \(\small\epsilon\) something like: \(\small\sim\mathcal{N}(0,\mathbf{\Sigma})\). where \(\small\mathbf{\Sigma}\) embodies the expected spatial covariation between subjects.

Thus, given an estimate \(\small\mathbf{\Sigma}\), we can fit the model as: \(\small\hat{\mathbf{\beta }}=\left ( \mathbf{X}^{T} \mathbf{\Sigma}^{-1} \mathbf{X}\right )^{-1}\left ( \mathbf{X}^{T} \mathbf{\Sigma}^{-1}\mathbf{Y}\right )\)

The question is: what is \(\small\mathbf{\Sigma}\)?

It turns out there are various ways to parameterize \(\small\mathbf{\Sigma}\), but it is always an \(\small{n\times{n}}\) matrix with values estimating the expected covariance between subjects as based on the geographic distance between them.

Note: this is conceptually identical to what we discussed with phylogenetic comparative methods, where \(\small\mathbf{\Sigma}\) was the phylogenetic covariance matrix (\(\small\mathbf{V}\))

Modeling Spatial Non-Independence

\[\small{Exponential}= \sigma^2e^{-r/d}\]

\[\small{Gaussian}= \sigma^2e^{(-r/d)^2}\]

\[\small{Spherical}= \sigma^2(1-2/\pi(r/d\sqrt{1-r^2/d^2}+sin^{-1}r/d))\]

where \(\small{r}\) describes the expected covariance (correlation) between a pair of subjects, and \(\small{d}\) is the distance between them over which this corralation decays.

NOTE: There are many other models of spatial dependence! (see Dormann et al. (2007) Ecography.)

Spatial Dependence: Autoregressive Models

NOTE: There are many other models of spatial dependence! (see Dormann et al. (2007) Ecography.)

Spatial Dependence: Autoregressive Models

see Dormann et al. (2007) Ecography

Spatial Dependence: Comparing Models

Results imply that GLS approach (i.e., a spatially-weighted model) performs quite well!

Spatial Statistics: Summary