# Model-Based and Model-Free Point Prediction Algorithms for Locally Stationary Random Fields
## 4 Model-Free Point Prediction
Now, let \(\hat{\Gamma}_{n}^{AR}\) be the \(n\times n\) covariance matrix associated with the fitted AR(p,q) model to the data \(Z_{t_{1}},\ldots,Z_{t_{n}}\) with \(p,q\) by minimizing AIC, BIC or a related criterion as described in [15]. Let \(\hat{\gamma}_{|i-j|}^{AR}\) denote the \(i,j\) element of the Toeplitz matrix \(\hat{\Gamma}_{n}^{AR}\). Using the 2D Yule-Walker equations to fit the AR model implies that \(\hat{\gamma}_{k,l}^{AR}=\check{\gamma}_{k,l}\) for \(k=0,1,\ldots,p\) and \(l=0,1,\ldots,q\). For the cases where \(k>p\) or \(l>q,\hat{\gamma}_{k,l}^{AR}\) can be fitted by iterating the difference equation that characterizes the fitted 2D AR model. In the R software, this procedure is automated for time series using the ARMAACT() function, and here we extend the same approach for stationary data over random fields. Estimating the 'uniformizing' transformation \(D_{t}(\cdot)\) and the whitening transformation based on \(\Gamma_{n}\) allows us to construct the transformation \(H_{n}:\underline{Y}_{t_{n}}\mapsto\underline{\epsilon}_{n}\). Here, \(\underline{\epsilon}_{n}\) is a random vector with i.i.d. components as required by the Model-Free prediction principle. Since all the steps in the transformation, i.e., Equations (32), (37) and (38), are invertible; therefore, the composite transformation \(H_{n}:\underline{Y}_{t_{n}}\mapsto\underline{\epsilon}_{n}\) is also invertible. However, in order to put the Model-Free Prediction Principle to work, we also need to estimate the transformation \(H_{n+1}\) (and its inverse). To do so, we need a positive definite estimator for the matrix \(\Gamma_{n+1}\); this can be accomplished by extending the covariance matrix associated with the fitted 2D AR(p,q) model to \((n+1)\) by \((n+1)\) i.e., calculate \(\hat{\Gamma}_{n+1}^{AR}\). Consider the following vectors which include the additional values \(Y_{t_{n+1}},Z_{t_{n+1}}\) and \(\underline{\epsilon}_{n+1}\) that have not yet been estimated:  
* \(\underline{Y}_{t_{n+1}}=(Y_{t_{1}},\ldots,Y_{t_{n}},Y_{t_{n+1}})^{\prime}\);
* \(\underline{Z}_{t_{n+1}}=(Z_{t_{1}},\ldots,Z_{t_{n}},Z_{t_{n+1}})^{\prime}\);
* \(\underline{\epsilon}_{n+1}=(\epsilon_{1},\ldots,\epsilon_{n},\epsilon_{n+1})^{\prime}\). We now show how to obtain the inverse transformation \(H_{n+1}^{-1}:\underline{\epsilon}_{n+1}\mapsto\underline{Y}_{t_{n+1}}\). Since \(\underline{\epsilon}_{n}\) and \(\underline{Y}_{t_{n}}\) are related in a one-to-one way via transformation \(H_{n}\); therefore, the values \(Y_{t_{1}},\ldots,Y_{t_{n}}\) are obtainable by \(\underline{Y}_{t_{n}}=H_{n}^{-1}(\epsilon_{n})\). Similar to the framework proposed for locally stationary time series in [9] below we show how to create the unobserved \(Y_{t_{n+1}}\) from \(\underline{\epsilon}_{n+1}\) using the following three steps (Algorithm 2). Since \(\underline{Y}_{t_{n}}\) has already been created using (the first \(n\) coordinates of) \(\underline{\varepsilon}_{n+1}\), the above completes the construction of \(\underline{Y}_{t_{n+1}}\) based on \(\underline{\varepsilon}_{n+1}\), i.e., the mapping \(H_{n+1}^{-1}:\underline{\varepsilon}_{n+1}\mapsto\underline{Y}_{t_{n+1}}\). By combining Equations (42)-(44) we can write the formula:  
\[Y_{t_{n+1}}=D_{t_{n+1}}^{-1}(\Phi(\underline{\varepsilon}_{n+1}\underline{ \varepsilon}_{n+1})).\]  
The term \(\underline{\varepsilon}_{n+1}\underline{\varepsilon}_{n+1}\) can be written as \(\sum_{i=1}^{n}c_{i}\varepsilon_{i}+c_{n+1}\varepsilon_{n+1}\); hence, the above can be compactly denoted as  
\[ \begin{split} Y_{t_{n+1}}=g_{n+1}(\varepsilon_{n+1})\;\;\text{ where}\\ g_{n+1}(x)=D_{t_{n+1}}^{-1}\Bigg{(}\Phi\Bigg{(}\sum_{i=1}^{n}c_{i} \varepsilon_{i}+c_{n+1}x\Bigg{)}\Bigg{)}.\end{split}  \tag{45}\]  
Equation (45) is the predictive equation required in the Model-free Prediction Principle where \(Y_{t_{n+1}}\) is estimated conditionally on \(\underline{Y}_{t_{n}}=(Y_{t_{1}},Y_{t_{2}},\ldots,Y_{t_{n}})\). The complete algorithm for constructing the Model-Free point predictors is as described below (Algorithm 3):  
```
i.