construct a sparse matrix of spatial constraints for a set of blocks

1 2 3 4 5 6 7 8 9 10 11 12 13 |

`coords` |
the spatial coordinates as a matrix with rows as objects and columns as dimensions |

`nblocks` |
the number of repeated coordinate blocks |

`sigma_within` |
the bandwidth of the within-block smoother |

`sigma_between` |
the bandwidth of the between-block smoother |

`shrinkage_factor` |
the amount of shrinkage towards the spatially localized average |

`nnk_within` |
the maximum number of nearest neighbors for within block smoother |

`nnk_between` |
the maximum number of nearest neighbors for between block smoother |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.