Title: | Stratified Heterogeneity Measure, Dominant Driving Force Detection, Interaction Relationship Investigation |
---|---|
Description: | Spatial stratified heterogeneity (SSH), referring to the within strata are more similar than the between strata, a model with global parameters would be confounded if input data is SSH. Note that the "spatial" here can be either geospatial or the space in mathematical meaning. Geographical detector is a novel tool to investigate SSH: (1) measure and find SSH of a variable Y; (2) test the power of determinant X of a dependent variable Y according to the consistency between their spatial distributions; and (3) investigate the interaction between two explanatory variables X1 and X2 to a dependent variable Y (Wang et al 2014 <doi:10.1080/13658810802443457>, Wang, Zhang, and Fu 2016 <doi:10.1016/j.ecolind.2016.02.052>). |
Authors: | Chengdong Xu [aut, cre], Jinfeng Wang [aut], Yue Hou [ctb], Qian Yin [ctb] |
Maintainer: | Chengdong Xu <[email protected]> |
License: | GPL (>= 2.0) |
Version: | 1.0-5 |
Built: | 2024-10-31 22:25:21 UTC |
Source: | CRAN |
Including data for neural-tube birth defects (NTD) Y and suspected and environmental factor data, "elevation", "soil type", and "watershed".
data("CollectData")
data("CollectData")
A data frame with 185 observations on the following 4 variables.
This function identifies the impact differences between two factors X1 ~ X2.
ecological_detector(y_column, x_column_nn, tabledata)
ecological_detector(y_column, x_column_nn, tabledata)
y_column |
The index or field name of explained variable column in input dataset. |
x_column_nn |
The index or field name of explanatory variable(s)in input dataset. |
tabledata |
The dataset (dataframe) contains fields of explained variable and explanatory variables. |
Results of ecological detector is the significance test of impact difference between two explanatory variables.
data(CollectData) ecological_detector("incidence",c("soiltype","watershed"),CollectData) ecological_detector("incidence",c("soiltype","watershed","elevation"),CollectData)
data(CollectData) ecological_detector("incidence",c("soiltype","watershed"),CollectData) ecological_detector("incidence",c("soiltype","watershed","elevation"),CollectData)
The factor detector q-statistic measures the spatial stratified heterogeneity of a variable Y, or the determinant power of a covariate X of Y.
factor_detector(y_column, x_column_nn, tabledata)
factor_detector(y_column, x_column_nn, tabledata)
y_column |
The index or field name of explained variable in input dataset. |
x_column_nn |
The index or the field name(s) of explanatory variable(s) in input dataset. |
tabledata |
The dataset (dataframe) contains fields of explained variable and explanatory variables. |
Results of factor detector include q statistic and the corresponding p value.
data(CollectData) factor_detector("incidence","soiltype",CollectData) factor_detector(1,2,CollectData) factor_detector (1,c(2,3,4),CollectData) factor_detector ("incidence",c("soiltype","watershed"),CollectData)
data(CollectData) factor_detector("incidence","soiltype",CollectData) factor_detector(1,2,CollectData) factor_detector (1,c(2,3,4),CollectData) factor_detector ("incidence",c("soiltype","watershed"),CollectData)
This function reveals whether the risk factors X1 and X2 (and more X) have an interactive influence on a disease Y.
interaction_detector(y_column, x_column_nn, tabledata)
interaction_detector(y_column, x_column_nn, tabledata)
y_column |
The index or field name of explained variable in input dataset. |
x_column_nn |
The index or field name of explanatory variable(s) in input dataset. |
tabledata |
The dataset (dataframe) contains fields of explained variable and explanatory variables. |
Results of interaction detector include the interactive q satistic.
data(CollectData) interaction_detector("incidence",c("soiltype","watershed"),CollectData) interaction_detector("incidence",c("soiltype","watershed","elevation"),CollectData)
data(CollectData) interaction_detector("incidence",c("soiltype","watershed"),CollectData) interaction_detector("incidence",c("soiltype","watershed","elevation"),CollectData)
This function calculates the average values in each stratum of explanatory variable (X), and presents if there exists difference between two strata.
risk_detector(y_column, x_column_nn, tabledata)
risk_detector(y_column, x_column_nn, tabledata)
y_column |
The index or field name of explained variable in input dataset. |
x_column_nn |
The index or field name of explanatory variable(s) in input dataset. |
tabledata |
The dataset (dataframe) contains fields of explained variable and explanatory variables. |
Results of risk detector include the means of explained variable in each stratum derived from an explanatory variable and the t-test for difference between two strata.
data(CollectData) risk_detector("incidence","soiltype",CollectData) risk_detector(1,2,CollectData) risk_detector(1,c(2,3,4),CollectData) risk_detector("incidence",c("soiltype","watershed","elevation"),CollectData)
data(CollectData) risk_detector("incidence","soiltype",CollectData) risk_detector(1,2,CollectData) risk_detector(1,c(2,3,4),CollectData) risk_detector("incidence",c("soiltype","watershed","elevation"),CollectData)