Title: | Stratified Heterogeneity Measure, Dominant Driving Force Detection, Interaction Relationship Investigation |
Version: | 1.0-5 |
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>). |
License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2.0)] |
Encoding: | UTF-8 |
RoxygenNote: | 7.3.1 |
Depends: | R (≥ 2.10) |
LazyData: | true |
Suggests: | knitr, rmarkdown |
VignetteBuilder: | knitr |
NeedsCompilation: | no |
Packaged: | 2024-08-20 06:02:59 UTC; 31701 |
Author: | Chengdong Xu [aut, cre], Jinfeng Wang [aut], Yue Hou [ctb], Qian Yin [ctb] |
Maintainer: | Chengdong Xu <xucd@Lreis.ac.cn> |
Repository: | CRAN |
Date/Publication: | 2024-08-26 15:50:10 UTC |
CollectData
Description
Including data for neural-tube birth defects (NTD) Y and suspected and environmental factor data, "elevation", "soil type", and "watershed".
Usage
data("CollectData")
Format
A data frame with 185 observations on the following 4 variables.
ecological detector
Description
This function identifies the impact differences between two factors X1 ~ X2.
Usage
ecological_detector(y_column, x_column_nn, tabledata)
Arguments
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. |
Value
Results of ecological detector is the significance test of impact difference between two explanatory variables.
Examples
data(CollectData)
ecological_detector("incidence",c("soiltype","watershed"),CollectData)
ecological_detector("incidence",c("soiltype","watershed","elevation"),CollectData)
factor detector
Description
The factor detector q-statistic measures the spatial stratified heterogeneity of a variable Y, or the determinant power of a covariate X of Y.
Usage
factor_detector(y_column, x_column_nn, tabledata)
Arguments
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. |
Value
Results of factor detector include q statistic and the corresponding p value.
Examples
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)
interaction detector
Description
This function reveals whether the risk factors X1 and X2 (and more X) have an interactive influence on a disease Y.
Usage
interaction_detector(y_column, x_column_nn, tabledata)
Arguments
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. |
Value
Results of interaction detector include the interactive q satistic.
Examples
data(CollectData)
interaction_detector("incidence",c("soiltype","watershed"),CollectData)
interaction_detector("incidence",c("soiltype","watershed","elevation"),CollectData)
risk detector
Description
This function calculates the average values in each stratum of explanatory variable (X), and presents if there exists difference between two strata.
Usage
risk_detector(y_column, x_column_nn, tabledata)
Arguments
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. |
Value
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.
Examples
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)