Title: | Information Consistency-Based Measures for Spatial Stratified Heterogeneity |
---|---|
Description: | Spatial stratified heterogeneity (SSH) denotes the coexistence of within-strata homogeneity and between-strata heterogeneity. Information consistency-based methods provide a rigorous approach to quantify SSH and evaluate its role in spatial processes, grounded in principles of geographical stratification and information theory (Bai, H. et al. (2023) <doi:10.1080/24694452.2023.2223700>; Wang, J. et al. (2024) <doi:10.1080/24694452.2023.2289982>). |
Authors: | Wenbo Lv [aut, cre, cph] |
Maintainer: | Wenbo Lv <[email protected]> |
License: | GPL-3 |
Version: | 0.2.0 |
Built: | 2025-01-16 05:55:17 UTC |
Source: | https://github.com/stscl/sshicm |
Measurement of Spatial Stratified Heterogeneity Based on Information Consistency for Continuous Variables
sshic(d, s, seed = 42, permutation_number = 999, bin_method = "Sturges")
sshic(d, s, seed = 42, permutation_number = 999, bin_method = "Sturges")
d |
The target variable. |
s |
The stratification. |
seed |
(optional) Random number seed, default is |
permutation_number |
(optional) Number of Random Permutations, default is |
bin_method |
(optional) Histogram binning method for probability density estimation, default is
|
A two-element numerical vector.
baltim = sf::read_sf(system.file("extdata/baltim.gpkg",package = "sshicm")) sshic(baltim$PRICE,baltim$DWELL)
baltim = sf::read_sf(system.file("extdata/baltim.gpkg",package = "sshicm")) sshic(baltim$PRICE,baltim$DWELL)
Information Consistency-Based Measures for Spatial Stratified Heterogeneity
sshicm( formula, data, type = c("IC", "IN"), seed = 42, permutation_number = 999, bin_method = "Sturges" )
sshicm( formula, data, type = c("IC", "IN"), seed = 42, permutation_number = 999, bin_method = "Sturges" )
formula |
A formula. |
data |
A |
type |
(optional) Measure type, default is |
seed |
(optional) Random number seed, default is |
permutation_number |
(optional) Number of Random Permutations, default is |
bin_method |
(optional) Histogram binning method for probability density estimation, default is
|
A tibble
.
## Not run: # This code may take a bit longer to execute: baltim = sf::read_sf(system.file("extdata/baltim.gpkg",package = "sshicm")) sshicm(PRICE ~ .,baltim,type = "IC") cinc = sf::read_sf(system.file("extdata/cinc.gpkg",package = "sshicm")) sshicm(THEFT_D ~ .,cinc,type = "IN") ## End(Not run)
## Not run: # This code may take a bit longer to execute: baltim = sf::read_sf(system.file("extdata/baltim.gpkg",package = "sshicm")) sshicm(PRICE ~ .,baltim,type = "IC") cinc = sf::read_sf(system.file("extdata/cinc.gpkg",package = "sshicm")) sshicm(THEFT_D ~ .,cinc,type = "IN") ## End(Not run)
Measurement of Spatial Stratified Heterogeneity Based on Information Consistency for Nominal Variables
sshin(d, s, seed = 42, permutation_number = 999)
sshin(d, s, seed = 42, permutation_number = 999)
d |
The target variable. |
s |
The stratification. |
seed |
(optional) Random number seed, default is |
permutation_number |
(optional) Number of Random Permutations, default is |
A two-element numerical vector.
cinc = sf::read_sf(system.file("extdata/cinc.gpkg",package = "sshicm")) sshin(cinc$THEFT_D,cinc$MALE)
cinc = sf::read_sf(system.file("extdata/cinc.gpkg",package = "sshicm")) sshin(cinc$THEFT_D,cinc$MALE)