Hierarchical Modeling for Univariate Spatial Data Geography 890, Hierarchical Bayesian Models for Environmental Spatial Data Analysis February 15, 2011 1
Spatial Domain 2 Geography 890
Spatial Domain This is a bad example because it s not a convex hull, but just go with it 2 Geography 890
Simple linear model Simple linear model Y (s) = µ(s) + ɛ(s), Response: Y (s) at location s Mean: µ = x T (s)β Error: ɛ(s) iid N(0, τ 2 ) D Y (s), x(s) 3 Geography 890
Simple linear model Simple linear model Assumptions regarding ɛ(s): ɛ(s) iid N(0, τ 2 ) Y (s) = µ(s) + ɛ(s), D ɛ(s i) ɛ(s j) 4 Geography 890
Simple linear model Simple linear model Assumptions regarding ɛ(s): ɛ(s) iid N(0, τ 2 ) Y (s) = µ(s) + ɛ(s), ɛ(s i ) and ɛ(s j ) are uncorrelated for all i j D ɛ(s i) ɛ(s j) 4 Geography 890
Sources of variation Spatial Gaussian processes (GP ): Say w(s) GP (0, σ 2 ρ( )) and Cov(w(s 1 ), w(s 2 )) = σ 2 ρ (φ; s 1 s 2 ) D w(s i) w(s j) 5 Geography 890
Sources of variation Spatial Gaussian processes (GP ): Say w(s) GP (0, σ 2 ρ( )) and Cov(w(s 1 ), w(s 2 )) = σ 2 ρ (φ; s 1 s 2 ) Let w = [w(s i )] n i=1, then w N(0, σ 2 R(φ)), where R(φ) = [ρ(φ; s i s j )] n i,j=1 D w(s i) w(s j) 5 Geography 890
Sources of variation Realization of a Gaussian process: Changing φ and holding σ 2 = 1: w N(0, σ 2 R(φ)), where R(φ) = [ρ(φ; s i s j )] n i,j=1 6 Geography 890
Sources of variation Realization of a Gaussian process: Changing φ and holding σ 2 = 1: w N(0, σ 2 R(φ)), where R(φ) = [ρ(φ; s i s j )] n i,j=1 Correlation model for R(φ): e.g., exponential decay ρ(φ; t) = exp( φt) if t > 0. 6 Geography 890
Sources of variation Realization of a Gaussian process: Changing φ and holding σ 2 = 1: w N(0, σ 2 R(φ)), where R(φ) = [ρ(φ; s i s j )] n i,j=1 Correlation model for R(φ): e.g., exponential decay ρ(φ; t) = exp( φt) if t > 0. Other valid models e.g., Gaussian, Spherical, Matérn. Effective range, t 0 = ln(0.05)/φ 3/φ 6 Geography 890
Sources of variation w N(0, σ 2 wr(φ)) defines complex spatial dependence structures. E.g., anisotropic Matérn correlation function: ρ(s i, s j; φ) = `1/Γ(ν)2 ν 1 2 p νd ij) ν κ p ν(2 νd ij, where d ij = (s i s j) Σ 1 (s i s j), Σ = G(ψ)Λ 2 G(ψ). Thus, φ = (ν, ψ, Λ). Simulated Predicted 7 Geography 890
Univariate spatial regression Simple linear model + random spatial effects Y (s) = µ(s) + w(s) + ɛ(s), Response: Y (s) at some site Mean: µ = x T (s)β Spatial random effects: w(s) GP (0, σ 2 ρ(φ; s 1 s 2 )) Non-spatial variance: ɛ(s) iid N(0, τ 2 ) 8 Geography 890
Univariate spatial regression Hierarchical modeling First stage: n y β, w, τ 2 N(Y (s i ) x T (s i )β + w(s i ), τ 2 ) i=1 9 Geography 890
Univariate spatial regression Hierarchical modeling First stage: n y β, w, τ 2 N(Y (s i ) x T (s i )β + w(s i ), τ 2 ) i=1 Second stage: w σ 2, φ N(0, σ 2 R(φ)) 9 Geography 890
Univariate spatial regression Hierarchical modeling First stage: n y β, w, τ 2 N(Y (s i ) x T (s i )β + w(s i ), τ 2 ) i=1 Second stage: w σ 2, φ N(0, σ 2 R(φ)) Third stage: Priors on Ω = (β, τ 2, σ 2, φ) 9 Geography 890
Univariate spatial regression Hierarchical modeling First stage: n y β, w, τ 2 N(Y (s i ) x T (s i )β + w(s i ), τ 2 ) i=1 Second stage: w σ 2, φ N(0, σ 2 R(φ)) Third stage: Priors on Ω = (β, τ 2, σ 2, φ) Marginalized likelihood: y Ω N(Xβ, σ 2 R(φ) + τ 2 I) 9 Geography 890
Univariate spatial regression Hierarchical modeling First stage: n y β, w, τ 2 N(Y (s i ) x T (s i )β + w(s i ), τ 2 ) i=1 Second stage: w σ 2, φ N(0, σ 2 R(φ)) Third stage: Priors on Ω = (β, τ 2, σ 2, φ) Marginalized likelihood: y Ω N(Xβ, σ 2 R(φ) + τ 2 I) Note: Spatial process parametrizes Σ: y = Xβ + ɛ, ɛ N (0, Σ), Σ = σ 2 R(φ) + τ 2 I 9 Geography 890
Univariate spatial regression Bayesian Computations Choice: Fit [y Ω] [Ω] or [y β, w, τ 2 ] [w σ 2, φ] [Ω]. 10 Geography 890
Univariate spatial regression Bayesian Computations Choice: Fit [y Ω] [Ω] or [y β, w, τ 2 ] [w σ 2, φ] [Ω]. Conditional model: conjugate full conditionals for σ 2, τ 2 and w easier to program. 10 Geography 890
Univariate spatial regression Bayesian Computations Choice: Fit [y Ω] [Ω] or [y β, w, τ 2 ] [w σ 2, φ] [Ω]. Conditional model: conjugate full conditionals for σ 2, τ 2 and w easier to program. Marginalized model: need Metropolis or Slice sampling for σ 2, τ 2 and φ. Harder to program. But, reduced parameter space faster convergence σ 2 R(φ) + τ 2 I is more stable than σ 2 R(φ). 10 Geography 890
Univariate spatial regression Bayesian Computations Choice: Fit [y Ω] [Ω] or [y β, w, τ 2 ] [w σ 2, φ] [Ω]. Conditional model: conjugate full conditionals for σ 2, τ 2 and w easier to program. Marginalized model: need Metropolis or Slice sampling for σ 2, τ 2 and φ. Harder to program. But, reduced parameter space faster convergence σ 2 R(φ) + τ 2 I is more stable than σ 2 R(φ). But what about R 1 (φ)?? EXPENSIVE! 10 Geography 890
Univariate spatial regression Where are the w s? Interest often lies in the spatial surface w y. 11 Geography 890
Univariate spatial regression Where are the w s? Interest often lies in the spatial surface w y. They are recovered from [w y, X] = [w Ω, y, X] [Ω y, X]dΩ using posterior samples: 11 Geography 890
Univariate spatial regression Where are the w s? Interest often lies in the spatial surface w y. They are recovered from [w y, X] = [w Ω, y, X] [Ω y, X]dΩ using posterior samples: Obtain Ω (1),..., Ω (G) [Ω y, X] For each Ω (g), draw w (g) [w Ω (g), y, X] 11 Geography 890
Univariate spatial regression Where are the w s? Interest often lies in the spatial surface w y. They are recovered from [w y, X] = [w Ω, y, X] [Ω y, X]dΩ using posterior samples: Obtain Ω (1),..., Ω (G) [Ω y, X] For each Ω (g), draw w (g) [w Ω (g), y, X] NOTE: With Gaussian likelihoods [w Ω, y, X] is also Gaussian. With other likelihoods this may not be easy and often the conditional updating scheme is preferred. 11 Geography 890
Univariate spatial regression Residual plot: [w(s) y] w mean of Y Easting Northing 12 Geography 890
Univariate spatial regression Another look: [w(s) y] w Easting Northing 13 Geography 890
Univariate spatial regression Another look: [w(s) y] w Easting Northing 14 Geography 890
Spatial Prediction Often we need to predict Y (s) at a new set of locations { s 0,..., s m } with associated predictor matrix X. Sample from predictive distribution: [ỹ y, X, X] = [ỹ, Ω y, X, X]dΩ = [ỹ y, Ω, X, X] [Ω y, X]dΩ, [ỹ y, Ω, X, X] is multivariate normal. Sampling scheme: Obtain Ω (1),..., Ω (G) [Ω y, X] For each Ω (g), draw ỹ (g) [ỹ y, Ω (g), X, X]. 15 Geography 890
Easting Spatial Prediction Prediction: Summary of [Y (s) y] y Northing 16 Geography 890
Illustration Colorado data illustration Modeling temperature: 507 locations in Colorado. Simple spatial regression model: Y (s) = x T (s)β + w(s) + ɛ(s) w(s) GP (0, σ 2 ρ( ; φ, ν)); ɛ(s) iid N(0, τ 2 ) Parameters 50% (2.5%,97.5%) Intercept 2.827 (2.131,3.866) [Elevation] -0.426 (-0.527,-0.333) Precipitation 0.037 (0.002,0.072) σ 2 0.134 (0.051, 1.245) φ 7.39E-3 (4.71E-3, 51.21E-3) Range 278.2 (38.8, 476.3) τ 2 0.051 (0.022, 0.092) 17 Geography 890
Illustration Temperature residual map Northing 4100 4200 4300 4400 4500 300 200 100 0 100 200 300 Easting 18 Geography 890
Illustration Elevation map Latitude 37 38 39 40 41 108 106 104 102 Longitude 19 Geography 890
Illustration Residual map with elev. as covariate Northing 4100 4200 4300 4400 4500 300 200 100 0 100 200 300 Easting 20 Geography 890