| compute_nngp_neighbors | R Documentation |
Compute the k nearest neighbors for each observation using Euclidean distance. Returns in a format suitable for the NNGP likelihood.
compute_nngp_neighbors(coords, k)
coords |
N x d matrix of coordinates |
k |
Number of nearest neighbors |
List with:
nn_idx: N x k matrix of neighbor indices (0 for obs with fewer neighbors)
nn_dist: N x k matrix of distances to neighbors
nn_order: Ordering of observations for NNGP (by coordinate)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.