an introduction to spatial autocorrelation and kriginglkgray/uploads/7/3/6/2/7362679/slides... ·...

21
An Introduction to Spatial Autocorrelation and Kriging Matt Robinson and Sebastian Dietrich RenR 690 – Spring 2016

Upload: doandung

Post on 06-Apr-2019

230 views

Category:

Documents


0 download

TRANSCRIPT

An Introduction to Spatial Autocorrelation and Kriging

Matt Robinson and Sebastian Dietrich

RenR 690 – Spring 2016

• Tobler’s 1st Law of Geography: “Everything is related to everything else, but near things are more related than distant things.”1

(1) Tobler W., (1970) "A computer movie simulating urban growth in the Detroit region". Economic Geography, 46(2): 234-240.

Waldo R. Tobler

• Simple but powerful concept

• Patterns exist across space

• Forms basic foundation for concepts related to spatial dependency

Tobler and Spatial Relationships

• Autocorrelation: A variable is correlated with itself (literally!)

• Spatial Autocorrelation: Values of a random variable, at paired points, are more or less similar as a function of the distance between them 2

Closer Points more similar = Positive Autocorrelation

Closer Points less similar = Negative Autocorrelation

(2) Legendre P. Spatial Autocorrelation: Trouble or New Paradigm? Ecology. 1993 Sep;74(6):1659–1673.

Spatial Autocorrelation (SAC) – What is it?

(1) Artifact of Experimental Design (sample sites not random)

(2) Interaction of variables across space (see below)

Univariate case – response variable is correlated with itself

Eg. Plant abundance higher (clustered) close to other

plants (seeds fall and germinate close to parent).

Multivariate case – interactions of response and predictor variables due to inherent properties of the variables

Eg. Location of seed germination function of wind

and preferred soil conditions

Mechanisms underlying patterns will depend on study system!!

Parent Plant

What causes Spatial Autocorrelation?

Presence of SAC can be good or bad (depends on your objectives)

Good: If SAC exists, it may allow reliable estimation

at nearby, non-sampled sites (interpolation).

Bad: If SAC exists, observations are not independent

(violates assumption of many statistical tests)

Failure to recognize/account for SAC can lead to

erroneous statistical results and conclusions

Why is it important?

Spatial structure = spatial patterns in your data

Structure Functions - mathematical functions that describe spatial autocorrelation and spatial structure 3

Include terms that account for distance between sites

Most common structure functions based on variance (variogram) and covariance (correlogram)

(3) Legendre P, Fortin MJ. 1989. Spatial pattern and ecological analysis. Vegetation. 80(2):107–138.

Structure Functions

Moran’s I (Moran’s Index): Measures degree of correlation between sample/observation points based on both variable values and distance between points 4

Determines whether spatial pattern in data is

random, clustered, or dispersed.

(4) How Spatial Autocorrelation (Global Moran’s I) works - (ArcGIS Desktop Help). Available from: http://help.arcgis.com/En/Arcgisdesktop/10.0/Help/index.html#//005p0000000t000000

Tests for SAC: Moran’s I

Moran’s I - Explained

Extension of Pearson’s Correlation Coefficient, r

Pearson’s (r): Measures association

between 2 different variables

Moran’s I: Measures degree of association

of single variable with itself at different

points in space as a function of distance

between points (called a spatial lag)5

Range: -1.0 (negative SAC) and 1.0 (positive SAC)

Value close to zero indicates no/little SAC

(5) Fortin, M.J., Dale, M.R. and Ver Hoef, J.M. 2002. Spatial analysis in ecology. Encyclopedia of environment.

(1) Calculate Matrix of Inverse Distance Weights - defines spatial relationship between all sample point pairs within a specified area.

(2) Calculate Observed and Expected Moran I

(3) Compare to Observed to Expected Moran’s I

(expected under H0 of no SAC)

Math Behind Moran’s I

Distance weight (from matrix)

S0 = Sum of all weights

Observed I

Expected I (Under H0 of No SAC)

Variable x at points i and j

Moran’s I: In R (using package “ape”)

Example Dataframe Station Av8top Lat Lon 1 60 7.225806 34.13583 -117.9236 2 69 5.899194 34.17611 -118.3153 3 72 4.052885 33.82361 -118.1875 4 74 7.181452 34.19944 -118.5347 5 ……..

Source: http://www.ats.ucla.edu/stat/r/faq/morans_i.htm

Response variable x and y coordinates (specify location of sample points to be tested)

zone.dists <- as.matrix(dist(cbind(ozone$Lon, ozone$Lat))) ozone.dists.inv <- 1/ozone.dists diag(ozone.dists.inv) <- 0 ozone.dists.inv[1:5, 1:5]

Moran.I(ozone$Av8top, ozone.dists.inv)

(1) Input dataframe

(2) Calculate Inverse Distance Matrix

(3) Run Moran’s I Function

Moran’s I: Output and Interpretation In R

Source: http://www.ats.ucla.edu/stat/r/faq/morans_i.htm Source: http://www.inside-r.org/packages/cran/ape/docs/Moran.I

Observed = Moran’s I calculated from the data Expected = Moran’s I expected under H0 (no spatial autocorrelation) sd = standard deviation of Moran’s I under H0

p.value = p-value of the test of H0 against HA

Moran’s I is an Inferential Statistic - Must examine in Context of Null Hypothesis (No Spatial Autocorrelation)

(1) Look at p-value

Significant p-value: reject H0 (Autocorrelation exists).

(2) Examine Observed and Expected Moran’s I

Observed > Expected: values cluster spatially

( + autocorrelation)

Observed < Expected values disperse spatially

(- autocorrelation)

Output in R

Other Autocorrelation Indices

• Geary’s C – (similar to Moran’s)

- more sensitive to differences in small spatial neighborhoods

• Moran’s I – global measurement; sensitive to extreme values

Result in similar conclusions, but Moran’s generally preferred (more powerful)5,6

For more information see: http://geog.ucsb.edu/~chris/readings/Spatial.Analysis.in.Ecology.Encyclopedia.Environmetrics.pdf

Geary’s C

(5) Cliff, AD and Ord, JK (1975). The choice of a test for spatial autocorrelation. In J. C. Davies and M. J. McCullagh (eds)

Display and Analysis of Spatial Data, John Wiley and Sons, London, 54-77

(6) Cliff, A. D. and Ord, J. K. 1981 Spatial processes - models and applications. (London: Pion).

Source: http://faculty.washington.edu/edford/Variogram.pdf

Georges François Paul Marie

Matheron December 2, 1930

August 7, 2000

French mathematician and

geologist, known as the founder

of geostatistics

Georges Matheron

Principles of geostatistics Economic Geology

1963 58:1246-1266

The Variogram

All credit to / Source: http://faculty.washington.edu/edford/Variogram.pdf

The variogram in a more ecologic context: The experimental variogram allows the description of the overall spatial pattern and the estimation of spatial autocorrelation parameters: (a) the spatial range, a, where the variable is spatially influenced by the same underlying process; (b) the nugget effect, which is the estimate of the error inherent in the measurements (sampling design and sampling unit size) and environmental variability; and (c) the sill that quantifies the spatial pattern intensity Secondly we derive a theoretical variogram which can be used for prediction of values (kriging) All credit to / Source (good read!): Spatial analysis in ecology Marie-Josee Fortin, Mark R.T. Dale & Jay ver Hoef ´ Volume 4, pp 2051–2058 in Encyclopedia of Environmetrics http://geog.ucsb.edu/~chris/readings/Spatial.Analysis.in.Ecology.Encyclopedia.Environmetrics.pdf

Variogram continued

Variogram or Semivariogram? Variance or Semivariance? Allan Variance or Introducing a New Term?

Martin Bachmaier , Matthias Backes

Mathematical Geosciences

August 2011, Volume 43, Issue 6, pp 735-740

First online: 01 July 2011

Suggested read Variogram:

Some history:

Method developed by Professor Daniel Gerhardus Krige

The concept of Support is very basic to geostatistics and was first covered by Ross (1950) and further developed by Krige (1951), including Krige’s variance-size of area relationship. 37 Spatial Structure and Variograms

The corresponding correlograms or covariograms were used on a Simple Kriging basis for block evaluations

Initially Professor Krige’s regressed estimates were then still called ‘weighted moving averages’ until Matheron’s insistence in the mid- 1960’s on the term Kriging in recognition of Professor Krige’s pioneering work.

Matheron, also then proposed the use of the variogram to define the

spatial structure. This model is an extension and refinement of the

concept covered by De Wijs (1951/3); (Source:https://www.goldfields.com/pdf/presentations/2015/summary_prof_danie_krige_memorial_lecture.pdf)

The theoretical basis for the method was developed by the French mathematician Georges Matheron based on the Master's thesis of Danie G. Krige, the pioneering plotter of distance-weighted average gold grades at the Witwatersrand reef complex in South Africa. (Source: https://en.wikipedia.org/wiki/Kriging)

The history of Kriging

• also known as BLUP (best linear unbiased prediction)

• returning the observed values at sampling locations

• interpolates values using the intensity and shape of the experimental and modeled variogram

• using a neighborhood and/or distance search radius

• provides the standard errors of the interpolated values

All credit to / Source (good read!): Spatial analysis in ecology Marie-Josee Fortin, Mark R.T. Dale & Jay ver Hoef ´ Volume 4, pp 2051–2058 in Encyclopedia of Environmetrics http://geog.ucsb.edu/~chris/readings/Spatial.Analysis.in.Ecology.Encyclopedia.Environmetrics.pdf

Kriging – what it does

Description: Kriging algorithm explained: To estimate the value of Cell 1 (C1) no data points are found within the range (note, the value of C2 has not been estimated yet). The range is governed by the variogram and indicates the point at which data shows no correlation (or where the semi-variance vs distance plot starts to flatten). Because no data exists whithin the range the average of all data points is used for the C1 cell. When the C2 cell is now visited the C1 cell and the other datapoints (two green and one yellow) are also used. Their relative weight is based on the variogram. The grey datapoint is only used to calculate the average, but is not used directly for estimating the point C1 and C2. All credit to / source: http://www.epgeology.com/gallery/image_page.php?album_id=10&image_id=201

Kriging – how it works

Kriging maps created with ArcGIS Spherical variogram model Not standardized Ideal for single site anlysis, but Challenging for interpretetation Solutions?! Solution: plot standardized kriging maps? Can for comparison different

variogram models be used to derive kriging maps?

Kriging – visual output

Mining

Hydrogeology

...and more!

Kriging: Fields of application

• Best method is proper experimental design

Sample points or sites should be spaced appropriately

Distance required will depend on your study system

Made some mistakes – all hope is not lost…..

• Some statistical methods exist to account for SAC6

(see below for resource)

(6) Dale, M.R.T., Fortin, M. 2002 Spatial autocorrelation and statistical tests in ecology. Écoscience. 2002; 9(2):162–167.

Accounting/Correcting for SAC?