spatial_constraints: spatial constraints

View source: R/constraints.R

spatial_constraintsR Documentation

spatial constraints

Description

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

Usage

spatial_constraints(
  coords,
  nblocks = 1,
  sigma_within = 5,
  sigma_between = 1,
  shrinkage_factor = 0.1,
  nnk_within = 27,
  nnk_between = 1,
  weight_mode_within = "heat",
  weight_mode_between = "binary",
  variable_weights = rep(1, ncol(coords) * nblocks),
  verbose = FALSE
)

Arguments

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


bbuchsbaum/neuropls documentation built on April 17, 2022, 8:46 a.m.