gstar_i: Compute Standardized Getis Ord G*i

View source: R/gstar.R

gstar_iR Documentation

Compute Standardized Getis Ord G*i

Description

Returns the Getis Ord G*i in standardized form.

Usage

gstar_i(shp, adj, wts, spatial_mat, epsg = 3857)

Arguments

shp

sf data frame. Optional if adj or spatial_mat provided.

adj

zero indexed adjacency list. Optional if shp or spatial_mat provided.

wts

Required. Numeric vector with weights to use for Moran's I.

spatial_mat

matrix of spatial weights. Optional if shp or adj provided.

epsg

numeric EPSG code to planarize to. Default is 3857.

Value

vector of G*i scores

Examples

library(dplyr)
data('checkerboard')
checkerboard <- checkerboard %>% mutate(m = as.numeric((id + i) %% 2 == 0))
gstar_i(shp = checkerboard, wts = checkerboard$m)

christopherkenny/geomander documentation built on Feb. 18, 2024, 7:58 p.m.