# Spatial statistics in practice

## Presentation on theme: "Spatial statistics in practice"— Presentation transcript:

Spatial statistics in practice
Lecture #5: MAPS WITH GAPS-- Small geographic area estimation, kriging, and kernel smoothing Spatial statistics in practice Center for Tropical Ecology and Biodiversity, Tunghai University & Fushan Botanical Garden

Topics for today’s lecture
The E-M algorithm The spatial E-M algorithm Kriging in ArcGIS geographically weighted regression (GWR) approaches to map smoothing

THEOREM 1 When missing values occur only in a response variable, Y, then the iterative solution to the EM algorithm produces the regression coefficients calculated with only the complete data. PF: Let b denote the vector of regression coefficients that is converged upon. Then if ,

THEOREM 2 When missing values occur only
in a response variable, Y, then by replacing the missing values with zeroes and intro-ducing a binary 0/-1 indicator variable covariate -Im for each missing value m, such that Im is 0 for all but missing value observation m and 1 for missing value observation m, the estimated regression coefficient bm is equivalent to the point estimate for a new obser-vation, and hence furnishes EM algorithm imputations. PF:Let bm denote the vector of regression coefficients for the missing values, and partition the data matrices such that

The EM algorithm solution
where: the missing values are replaced by 0 in Y, and Im is an indicator variable for missing value m that contains n-m 0s and a single 1

THEOREM 3 For imputations computed
based upon Theorem 2, each standard error of the estimated regression coefficients bm is equivalent to the conventional standard deviation used to construct a prediction interval for a new observation, and as such furnishes the corresponding EM algorithm imputation standard error. PF:

What is the set of equations for the following case?
10 7 y4 = ?

Some preliminary assessments

simulations

simulated imputations

EM algorithm solution for aggregated georeferenced data: vandalized turnips plots

MTB > regress c4 8 c7-c14 Regression Analysis: C4 versus C7, C8, C9, C10, C11, C12, C13, C14 The regression equation is C4 = C C C C C C C C14 Predictor Coef SE Coef T P Constant C7 [I1-I6] C8 [I2-I6] C9 [I3-I6] C10 [I4-I6] C11 [I5-I6] C12 [plot(6,5)] C13 [plot(5,6)] C14 [plot(6,6)]

Analysis of Variance for C4 Source DF SS MS F P C5 5 1289. 0 257. 8 8
Analysis of Variance for C Source DF SS MS F P C Error Total Individual 95% CIs For Mean Based on Pooled StDev Level N Mean StDev (-----*-----) (----*-----) (----*-----) (-----*-----) (-----*-----) (------*-----) Pooled StDev =

Residual spatial autocorrelation
What does this mean?

SAR-based missing data estimation
where ym is a missing value (replaced by 0 in Y), Im is an indicator variable for ym, and is the mth column of geographic weights matrix W

The Jacobian term NOTE: denominator becomes (n-nm)

What is the set of equations for the following case?
7 Y2 = ? 10

spatial autoregressive (AR)
kriging estimate with semivariogram model fit semivariogram model with

The pure spatial autocorrelation CAR model
NOTE: exactly the same algebraic structure as the kriging equation Dispersed missing values: Imputation = the observed mean plus a weighted average of the surrounding residuals

Employing rook’s adjacency and a CAR model, what is the equation for the following imputation?
10 3 7 6 y5 = ? 4 9 5

The spatial filter EM algorithm solution
where: the missing values are replaced by 0 in Y, and Im is an indicator variable for missing value m that contains n-m 0s and a single 1

Conven-tional EM estimate Spatial SAR-EM estimate = 0.443
Imputation of turnip production in 3 vandalized field plots Field plot Conven-tional EM estimate Spatial SAR-EM estimate = 0.443 Spatial filter: 3 selected eigenvectors (6,5) 28.9 29.99 24.31 (5,6) 18.8 17.66 13.62 (6,6) 27.8 28.26 23.93

Cressie’s PA coal ash model estimate Cressie 10.27% Spherical 10.62%
Gaussian 10.18% exponential 10.12% SAR 10.17% spatial filter 10.71% min mean max 7.00 9.78 17.61

Predicted from spatial filter
Missing 1992 georeferenced density of milk production in Puerto Rico: constrained (total = 1918) Predicted from 1991 DMILK Predicted from spatial filter Predicted from both 235 70 385 1,339 1,848 1,065 344 468 predictions Moran scatterplot

USDA-NASS estimation of Pennsylvania crop production
covariate total constraints map gaps

USDA-NASS estimation of Michigan crop production
If this is 2% milk, how much am I paying for the other 98%?

different response variable specifications Michigan imputations

USDA-NASS estimation of Tennessee crop production

Tennessee imputations

An EM specification when some data for both Y and the Xs are missing

Concatenation results:

spatial autocorrelation
The spatial model covariate spatial autocorrelation power transformation totals constraints

Spatial filter: 3 selected eigenvectors
Imputation of turnip production in 3 vandalized field plots Field plot Spatial filter: 3 selected eigenvectors (6,5) 24.31 (5,6) 13.62 (6,6) 23.93

Cross-validation of spatial filter for observed turnip data

Kriging: best linear unbiased spatial interpolator (i.e., predictor)
The accompanying table contains a test set of sixteen random samples (#17-32) used to evaluate three maps. The “Actual” column lists the measured values for the test locations identified by “Col, Row” coordinates. The difference between these values and those predicted by the three interpolation techniques form the residuals shown in parentheses. The “Average” column compares the whole field arithmetic mean of 23 (guess 23 everywhere) for each test location.

ArcGIS: Geostatistical Wizard
density of German workers anisotropy check

Cross-validation check of krigged values
This is one use of the missing spatial data imputation methods.

Unclipped krigged surface
exponential semivariogram model values increase with darkness of brown extrapolation krigged (mean response) surface prediction error surface

Clipped krigged surface
krigged (mean response) surface values increase with darkness of brown prediction error surface

Detrended population density across China
anisotropy check

Cross-validation check of krigged values
This is one use of the missing spatial data imputation methods.

Unclipped krigged surface
exponential semivariogram model values increase with darkness of brown extrapolation krigged (mean response) surface prediction error surface

Clipped krigged surface
krigged (mean response) surface values increase with darkness of brown prediction error surface

THEOREM 4 The maximum likelihood estimate for missing georeferenced values described by a spatial autoregressive model specification is equivalent to the best linear unbiased predictor kriging equation of geostatistics.

Geographically weighted regression: GWR
Spatial filtering enables easier implementation of GWR, as well as proper assessment of its dfs Step #1: compute the eigenvectors of a geographic connectivity matrix, say C Step #2: compute all of the interactions terms XjEk for the P covariates times the K candidate eigenvectors (e.g., with MC > 0.25) Step #3: select from the total set, including the individual eigenvectors, with stepwise regression

Step #4: the geographically varying intercept term is given by:
Step #5: the geographically varying covariate coefficient is given by factoring Xj out of its appropriate selected interaction terms:

A Puerto Rico DEM example
Mean elevation (Y) is a function of: standard deviation of elevation (X), eigenvectors E1-E18, and 18 interaction terms (XE) Results intercept: 1, E2, E5-E7, E9, E11-E13, E15, E18 slope: 1, E4, E6, E9, E10 R2 increases from (with X only) to (with geographically varying coefficients) P(S-W) = 0.52 for the final model

GWR-spatial filter intercept (MC = 0.692) filter slope (MC = 0.721)

Spatial moving averages
Local smoothing of attribute values where: wij is a spatial weights matrix yi is the attribute value for each areal unit n is the number of areal units

What have we learned today ?

A summary: what have we learned during the 5 lectures?
The nature of data and its information content. What is spatial autocorrelation? Visualizing spatial autocorrelation: Moran scatterplots, semivariogram plots, and maps. Defining and articulating spatial structure: topology and distance perspectives; contagion and hierarchy concepts. Necessary concepts from multivariate statistics. An example of the elusive negative spatial autocorrelation. Some comments about spatial sampling. Implications about space-time data structure.

Multivariate grouping, and location-allocation modeling.
Lecture #2 Multivariate grouping, and location-allocation modeling. Going from the global to the local: variability and heterogeneity. Impacts of spatial autocorrelation on histograms. The LISA and Getis-Ord statistics. Cluster analysis: multivariate analysis, cluster detection, and spider diagrams. An overview of geographic and space-time clusters. Regression diagnostics and geographic clusters

Lecture #3 Autoregressive specifications and normal curve theory (PROC NLIN). Auto-binomial and auto-Poisson models: the need for MCMC. Relationships between spatial autoregressive and geostatistical models Spatial filtering specifications and linear and generalized linear models (PROC GENMOD). Autoregressive specifications and linear mixed models (PROC MIXED). Implications for space-time datasets (PROC NLMIXED)

Lecture #4 Frequentist versus Bayesian perspectives. Implementing random effects models in GeoBUGS. Spatially structured and unstructured random effects: the CAR, the ICAR, and the spatial filter specifications Lecture #5 The E-M algorithm The spatial E-M algorithm Kriging in ArcGIS Approaches to map smoothing