ssh.test | R Documentation |
Calculate the factor detector q-statistic and the interaction detector in the geographical detector model described by Wang et al. (2010). The q-statistic measures the SSH of the sampling attribute in terms of a given stratification, which can be used for the selection of an SSH layer for Sandwich model-based mapping. The interactive effects indicate whether a combination of two stratifications enhances the SSH of the sampling attribute.
ssh.test(object,
y,
x,
test="factor",
type="shp")
object |
An object generated by |
y |
Text for the name of the explained variable (sampling attribute) in |
x |
Text for the name(s) of the explanatory variable(s) (stratification(s)) in |
test |
Text for the type of test. |
type |
Text for the type of input data. |
A value of the q-statistic or the combined q-statistic.
Wang, J. F., Li, X. H., Christakos, G., Liao, Y. L., Zhang, T., Gu, X., & Zheng, X. Y. (2010). Geographical detectors-based health risk assessment and its application in the neural tube defects study of the Heshun Region, China. International Journal of Geographical Information Science, 24(1), 107-127.
ssh.data.shp
, ssh.data.txt
library(sf)
library(tools)
data(sim.data)
sim.join <- ssh.data.shp(object=sim.data[[1]], ssh.lyr=sim.data[[2]], ssh.id="X")
head(sim.join)
ssh.test(object=sim.join, y="Value", x=c("X"), test="factor")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.