w_sim: Simulate a symmetric binary spatial weights matrix

Description Usage Arguments Value Examples

View source: R/w_sim.R

Description

Simulate a symmetric binary spatial weights matrix

Usage

1
w_sim(n, cutoff = 0.2)

Arguments

n

The number of observations to include

cutoff

A threshold above which observations are no longer considered neighbors. Observations are sampled in a (-1, 1) grid space. The default cutoff is a distance of 0.2

Value

A simulated symmetric spatial weights matrix based on sampled observations from a unit-grid.

Examples

1
w_sim(20)

loganstundal/spatialhelpers documentation built on Dec. 21, 2021, 11:46 a.m.