# Prediction and Surveillance Sampling Assessment in Plant Nurseries and Fields
## 2 Method
### Bayesian Kriging for a Binary Response  
In situations where we want to know the occurrence of an event of interest and the spatial process can be seen as a continuous process, we can follow [14] and consider a hierarchical model for geostatistical data. In particular, we describe Bayesian kriging and its application to the presence or absence of a disease in plants. Specifically, let \(Y_{i}\) be a random Bernoulli variable that represents the presence (1) or absence (0) at location \(i\) (\(i=1,\ldots,n\)), and let \(\pi_{i}\) be the probability of the presence of disease. We assume for \(Y_{i}\)  
\[Y_{i}\sim\text{Ber}(\pi_{i})\] \[\text{logit}(\pi_{i})=\beta_{0}+W_{i} \tag{1}\]  
where \(\beta_{0}\) represents the intercept of the linear predictor, and \(W_{i}\) represents the random effect with a spatial structure, while the relationship between \(\pi_{i}\) and the covariates of interest and the random effect is modeled by the usual logit link. This proposal does not include the effect of covariates; therefore, the probability of the presence of disease is determined only by the intercept and by the spatial random effect. \(W_{i}\) is assumed to be Gaussian with a covariance matrix \(\sigma_{W}^{2}H(\phi)\)depending on the distance between locations and with hyperparameters \(\sigma_{W}^{2}\) and \(\phi\) representing the variance (partial sill) and the range of the spatial effect, respectively. We assume the following distribution for \(W_{i}\):  
\[W\sim N(0,\sigma_{W}^{2}H(\phi)) \tag{2}\]  
The structure of \(H(\phi)\) is determined by the Matern function  
\[C(h)=\frac{\sigma^{2}}{2^{\
u-1}\Gamma(\
u)}(\kappa h)^{\
u}K_{\
u}(\kappa h)\]  
\(K_{\
u}\) is the modified Bessel function of the second-type and order \(\
u>0\). The parameter \(\mu\) is usually fixed and measures the degree of smoothing of the whole process; its integer value determines the differentiability mean quadratic of the process. \(\kappa\) is a scale parameter related to the range. The spatial correlation function \(C(H)\) depends on the locations \(s_{i}\) and \(s_{j}\) only through the Euclidean distance \(h=\parallel s_{i}-s_{j}\parallel\in\Re\). The modeling approach can be augmented by incorporating a pure error term known as the nugget effect in classic kriging. This effect describes the \"noise\" associated with the replication of measurement at each location, as is usual when using the Bayesian approach to assign a Gaussian distribution. Under the Bayesian paradigm, we have to specify the prior distributions for each parameter involved in the model \((\beta_{0},\sigma_{W}^{2},\phi)\). In this regard, the usual choice is to deal with independent priors for the parameters [1], i.e.,  
\[p(\beta_{0},\sigma_{W}^{2},\phi)=p(\beta_{0})p(\sigma_{W}^{2})p(\phi) \tag{3}\]  
When we want to express some initial vague but useful knowledge about the parameters, a non-informative Gaussian prior distribution is usually chosen as candidate distributions for \(\beta_{0}\) and an inverse gamma distribution for \(\sigma_{W}^{2}\). The specification of \(\phi\) will depend on the choice of the correlation function, which determines the covariance matrix \(H\)[1]. The final choice for the priors will depend on the type of modeling and parameterization chosen to be defined. Expressions of (1)-(3) contain all our knowledge about the posterior distribution but do not produce closed expressions for the posterior distributions of the parameters. The general form of the posterior distribution for the variables \(y=\{y_{1},\ldots,y_{n}\}\) denoted by \(\pi(y|x,\theta)\) with \(\theta=(\theta_{1}^{T},\theta_{2}^{T})\) with \(\text{dim }(\theta)=2\) is the following:\[\pi(x,\theta|y) \propto\pi(\theta)\pi(x|\theta)\Pi_{i}\pi(y_{i}|x_{i},\theta)\] \[\propto\pi(\theta)|Q(\theta)|^{n/2}\text{exp}\Big{(}-\tfrac{1}{2}x ^{T}Q(\theta)x+\sum_{i}\text{log}\pi(y_{i}|x_{i},\theta)\Big{)} \tag{4}\]  
where \(Q(\theta)\) is non-singular. The approximation to the marginal posterior of \(\pi(x_{i}|y)\), \(\pi(\theta|y)\) and \(\pi(\theta_{i}|y)\) is discussed below.