# Model-Based and Model-Free Point Prediction Algorithms for Locally Stationary Random Fields
## 4 Model-Free Point Prediction
Recall that the derivative of \(\bar{D}_{lk}^{LL}(y)\) with respect to \(y\) is given by \[\bar{d}_{lk}^{LL}(y)=\frac{\frac{1}{R_{0}}\sum_{j=1}^{T}w_{j}\lambda(\frac{y^{ -Y_{j}}}{R_{0}})}{\sum_{j=1}^{n}w_{j}}\] where \(\lambda(y)\) is the derivative of \(\Lambda(y)\) and the weights \(w_{j}\) can be derived based on Equations (22) and (30) for the fitted and predictive cases. 2. Define a nonnegative version of \(\bar{d}_{lk}^{LL}(y)\) as \(\bar{d}_{lk}^{LL+}(y)=\max(\bar{d}_{lk}^{LL}(y),0)\). 3. To make the above a proper density function, renormalize it to area one, i.e., let \[\bar{d}_{lk}^{LLM}(y)=\frac{\bar{d}_{lk}^{LL+}(y)}{\int_{-\infty}^{\infty}\bar {d}_{lk}^{LL+}(s)ds}.\] (36)
4. Finally, define \(\bar{D}_{lk}^{LLM}(y)=\int_{-\infty}^{y}\bar{d}_{lk}^{LLM}(s)ds\). **Algorithm 1**Monotone Local Linear Distribution Estimation  
The above modification of the local linear estimator allows one to maintain monotonicity while retaining the negative weights that are helpful in problems that involve estimation at the boundary. As with Equation (33), we can let \(T=k\) or \(T=k-1\) in the above, leading to a **fitted vs. predictive** local linear estimators of \(D_{lk}(y)\) that are monotone. **Step 2: Transformation to iid normal samples**  
Starting from the original random field data \(Y_{l_{k}},\ldots,Y_{l_{n}}\) by using either the local constant, the local linear or the monotone local linear distribution estimator in Step 1 it is possible to obtain samples \(U_{l_{k}},\ldots,U_{l_{n}}\) having distribution Uniform \((0,1)\). However, these samples are dependent, and therefore, additional steps are necessary to convert them to i.i.d. samples as required for Model-Free inference. This is performed as described below. Let \(\Phi\) denote the cumulative distribution function (cdf) of the standard normal distribution. Therefore we have:  
\[Z_{l}=\Phi^{-1}(U_{l})\ \ \text{for}\ \underline{t}=\underline{t}_{1},\ldots, \underline{t}_{n}; \tag{37}\]  
Here \(Z_{l_{1}},\ldots,Z_{l_{n}}\) are correlated standard normal random variables. Now let \(\Gamma_{n}\) denote the \(n\times n\) covariance matrix of the random vector \(Z_{l_{n}}=(Z_{l_{1}},\ldots,Z_{l_{n}})^{\prime}\). Consider the Cholesky decomposition \(\Gamma_{n}=C_{n}C_{n}^{\prime}\) where \(C_{n}\) is (lower) triangular, and construct the _whitening_ transformation:  
\[\underline{\epsilon}_{n}=C_{n}^{-1}Z_{l_{n}}. \tag{38}\]  
It then follows that the entries of \(\underline{\epsilon}_{n}=(\epsilon_{1},\ldots,\epsilon_{n})^{\prime}\) are uncorrelated standard normal. Assuming that the random variables \(Z_{l_{1}},\ldots,Z_{l_{n}}\) are _jointly_ normal it can then be inferred that \(\epsilon_{1},\ldots,\epsilon_{n}\) are i.i.d. \(N(0,1)\). Joint normality can be established by assuming a generative model of the random field as given by Equation (31); for a more detailed discussion refer to [9]. To implement the whitening transformation (38), it is necessary to estimate \(\Gamma_{n}\), i.e., the \(n\times n\) covariance matrix of the random vector \(\underline{Z}_{t_{n}}=(Z_{t_{1}},\ldots,Z_{t_{n}})^{\prime}\) where the \(Z_{t}\) are the normal random variables defined in Equation (37). The problem involves positive definite estimation of \(\Gamma_{n}\) based on the sample \(Z_{t_{1}},\ldots,Z_{t_{n}}\). This estimate is based on the sample autocovariance, which is defined for a 2D second-order stationary random field \(\{y_{r,s}|r=1,2,\ldots,R,\ s=1,2,\ldots,S\}\) as follows [15]:  
\[ \begin{split}\check{\gamma}(j,k)&=\check{\gamma}(- j,-k)\\ &=\frac{1}{(R-j)(S-k)}\sum_{s=1}^{R-j}\sum_{t=1}^{S-k}\{y_{r+j,s+k }-\bar{y}\}\{y_{r,s}-\bar{y}\}\\ \check{\gamma}(j,-k)&=\check{\gamma}(-j,k)\\ &=\frac{1}{(R-j)(S-k)}\sum_{s=1}^{R-j}\sum_{t=k+1}^{S}\{y_{r+j,s -k}-\bar{y}\}\{y_{r,s}-\bar{y}\}\end{split}  \tag{39}\]  
where \((j,k=0,1,2,\ldots)\).