spatial_constraints: spatial constraints

Description Usage Arguments

View source: R/constraints.R

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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 Dec. 9, 2020, 7:02 p.m.