Skip to content

Commit 8a22fc3

Browse files
committed
add-spatial-lags >> added info about weights summary
1 parent 21f1311 commit 8a22fc3

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

R/add-spatial-lags.R

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@
2929
#' - See the Spatial Weights section in the [Geospatial, Spatial Weights](https://ercbk.github.io/Data-Science-Notebook/qmd/geospatial-spatial-weights.html#sec-geo-swgt-swts) note of my Data Science notebook for details
3030
#'
3131
#' The spatial weights summary is extracted from the output of printing the `spdep::nb2listw` or `spdep::nb2listwdist` object. It contains characteristics such as the number of regions, number of nonzero links, percentage of nonzero weights, average number of links.
32+
#' - n: This refers to the number of regions (or spatial units) in your dataset.
33+
#' - nn: This refers to the total number of possible pairwise relationships between the regions. It is calculated as n × n. This represents the total number of possible links if every region were connected to every other region, including itself.
34+
#' - S0: This is the sum of all weights.
35+
#' - S1: This is related to the sum of the squares of the weights.
36+
#' - S2: This is related to the sum of the products of the weights for each pair of neighbors.
37+
#' - S0, S1, S2 are constants used in inference for global spatial autocorrelation statistics
3238
#'
3339
#' @importFrom chk chk_s3_class chk_character chk_subset chk_numeric
3440
#' @importFrom spdep nb2listw nb2listwdist nblag lag.listw

man/add_spatial_lags.Rd

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)