Skip to contents

The S0, S1 and S2 totals of a spatial weights matrix: S0 = sum_ij w_ij (spdep's Szero), S1 = 0.5 sum_ij (w_ij + w_ji)^2 and S2 = sum_i (sum_j w_ij + sum_j w_ji)^2. Every asymptotic test of spatial autocorrelation is a function of these three.

Usage

morie_weights_totals(W)

Arguments

W

numeric spatial weights matrix

Value

list with S0, S1, S2 and n

Examples

morie_weights_totals(W = 5L)
#> $S0
#> [1] 5
#> 
#> $S1
#> [1] 50
#> 
#> $S2
#> [1] 100
#> 
#> $n
#> [1] 1
#>