| computeC | R Documentation |
Constructs the local covariance matrix associated with a focal location and its neighbor set under the Nearest-Neighbor Gaussian Process (NNGP).
computeC(fdist, ndist, rho, sigma2)
fdist |
Numeric matrix ( |
ndist |
Numeric vector (length |
rho |
Positive numeric scalar. Length-scale parameter |
sigma2 |
Positive numeric scalar. Marginal variance parameter |
This function constructs the local covariance matrix used in the NNGP approximation for conditional Gaussian distributions. The covariance structure is defined using an exponential covariance function.
The structure of the matrix is:
Top-left block: covariance among neighbors
Last row/column: covariance between focal location and neighbors
Bottom-right: marginal variance of the focal location
A small nugget term (1e-6) is added to the diagonal for numerical stability.
A numeric matrix of dimension (k+1) \times (k+1) representing the
local covariance matrix for the focal location and its neighbors.
Fabian Ketwaroo
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.