forked from aucarter/nonstat_cov
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Presenttation.Rmd
120 lines (82 loc) · 5.92 KB
/
Presenttation.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
---
title: "Does non-stationary spatial data always require non-stationary random fields?"
author: "Adrien Allorant and Austin Carter"
date: "3/10/2020"
output: beamer_presentation
incremental: true
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
```
## Summary
**Real world processes have spatially varying second-order structure, but is modeling this non-stationarity worth it?**
The authors develop a novel model for non-stationary covariance structure and illustrate methods for parameterizing the model. They then apply their model to US precipitation data and compare predictions from their stationary and non-stationary models. They conclude by recommending careful consideration of the sources of non-stationarity and encourage balance between fitting complicated/flexible models and fitting simple/smarter models.
## Classical Approaches to Non-stationarity and Anisotropy
- In class, we have seen non-stationarity in the mean, and how to account for it; the topic of this paper is to address non-stationarity in the covariance structure. Anisotropy is a common violation to non-stationarity, and refers to the setting where the association between two locations does not only depend upon distance, but also upon direction
- Addressing non-stationarity in the covariance
> - In a seminal paper Sampson and Guttorp (1992) introduced an approach for non-stationarity through the **deformation method**: transform the geographic region $D$ to a new region $G$
If $C$ denotes the isotropic covariance function on $G$, we have:
$$
\begin{aligned}
\text{cov}(Y(s),Y(s')) &= C(||g(s)-g(s')||) \\
& \text{ with $C$ a standard class of covariance function, and $g$ estimated with a class of thin plate splines}
\end{aligned}
$$
> - In the paper we are presenting today, the authors introduce a novel approach building on the idea of a **local deformation** via **SPDE**
## Stationary SPDE
The following equation defines a stochastic partial differential equation (SPDE), $u(\vec s)$, whose solution is the Matérn covariance function
$$
\begin{aligned}
(\kappa ^2 - \nabla \cdot \nabla) u(\vec s) = \sigma \mathcal{W}(\vec s),\qquad \vec s \in \mathbb{R}^2
\end{aligned}
$$
Where $\kappa$ and $\sigma > 0$ are constants, $\nabla = \left(\frac{\partial}{\partial x}, \frac{\partial}{\partial y}\right)^T$ and $\cal W$ is a standard Gaussian white noise process. This correlation structure is isotropic because the Laplacian, $\Delta = \nabla \cdot \nabla$ is equal to the sum of the diagonal elements of the Hessian, is invariant to a change of coordinates that involves rotation and translation. The solution to this SPDE is a class of equations that have covariance described by the Matérn covariance function.
## GMRF Approximation
\begin{center}
\includegraphics[width=1.00\textwidth]{C:/Users/allorant/OneDrive - UW/Shared with Everyone/UW/3rdYear/Winter/STAT517/Final_project/code/GMRFapprox.png}
\end{center}
The graph above displays a true continuously-indexed Gaussian Field and its discrete approximation
## Model for Non-stationarity
The authors introduce a $2 \times 2$ matrix $\mathbf{H}$ into the SPDE which acts as a transformation of the grid on top of which we are measuring distance
$$
\begin{aligned}
(\kappa ^2 - \nabla \cdot \mathbf{H} \nabla) u(\vec s) &= \sigma \mathcal{W}(\vec s),\qquad \vec s \in \mathbb{R}^2
\end{aligned}
$$
This results in an updated covariance function
$$
\begin{aligned}
r(\vec s_1, \vec s_2) &= \frac{\sigma ^2}{4 \pi \kappa^2\sqrt{\det(\mathbf{H})}}\left(\kappa||\mathbf{H}^{-1/2}(\vec s_2 - \vec s_1) || \right) K_1 \left(\kappa||\mathbf{H}^{-1/2}(\vec s_2 - \vec s_1) || \right)
\end{aligned}
$$
Parameters $\kappa$ and $\mathbf{H}$ control the marginal variance and directionality of correlation, allowing $\sigma$ to fall out of the SPDE formmula. The $\sqrt{\det(\mathbf{H})}$ that appears in the denominator of the covariance function is a consequence of the change of variable.
## 2D-Random Walk Penalty
To enforce smoothness of parameters across space, the authors introduce a second-order penalty into their model for the spatially-specific covariance parameters:
$$ - \Delta \beta(\vec s) = \cal W_{\beta}(\vec s) / \sqrt{\tau_{\beta}} $$
where $\beta(\vec s)$ is the location-specific value for parameter $\beta$ and
$$ \log(\beta(\vec s)) = \sum_{i = 1}^k\sum_{j = 1}^l \alpha_{ij}f_{ij}(\vec s)$$
where $\{\alpha_{ij}\}$ are the parameters for real-valued basis functions $\{f_{ij}\}$.
$$ \vec \alpha \sim \cal N_{kl}\left(\vec 0, \mathbf{Q}_{\textrm{RW2}}^{-1} / \tau_{\beta}\right) $$
## Full Hierachical Model
Observations:
- Outcome: $\vec{y} = (y_1,\dots, y_n)$, at locations $\vec{s_1},\dots, \vec{s_n}$
- Predictor: $X = (\vec{x(s_1)}, \dots, \vec{x(s_n)})$
- Spatial field $\vec{u}$ a GMRF
- $E = (\vec{e(s_1)}, \dots, \vec{e(s_n)})$
$$
\begin{aligned}
\text{Stage 1: } & \vec y|\vec \beta, \vec u, \log(\tau_{\text{noise}}) \sim \mathcal N_N(\mathbf{X} \vec \beta + \mathbf{E}\vec u, \mathbf{I}_N/\tau_{\text{noise}}) \\
\text{Stage 2: } & \vec u | \vec \alpha_1, \vec \alpha_2, \vec \alpha_3, \vec \alpha_4 \sim \mathcal N_{nm}(\vec 0, \mathbf{Q}^{-1}), \qquad \vec \beta \sim \mathcal N_p(\vec 0, \mathbf I_p/\tau_{\beta}) \\
\text{Stage 3: } & \vec \alpha_i|\tau_i \sim \mathcal N_{kl}(\vec 0, \mathbf Q_{\text{RW2}}^{-1}/\tau_i) \quad \text{for } i = 1,2,3,4 \\
& \text{where } \tau_1,\tau_2,\tau_3,\tau_4 \text{ and } \tau_{beta}\text{ are penalty parameters that must be pre-selected}\\
\end{aligned}
$$
## Comparing stationary and non-stationary models
\begin{center}
\includegraphics[width=1.00\textwidth]{C:/Users/allorant/OneDrive - UW/Shared with Everyone/UW/3rdYear/Winter/STAT517/Final_project/code/paperRes.png}
\end{center}
## Implementation of the paper
We have fitted a stationary model to the data, getting the following results:
\begin{center}
\includegraphics[width=1.00\textwidth]{C:/Users/allorant/OneDrive - UW/Shared with Everyone/UW/3rdYear/Winter/STAT517/Final_project/code/predPlot.png}
\end{center}