Learn R Programming

geodetector (version 1.0-5)

risk_detector: 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)

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.

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.

Examples

Run this code
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)

Run the code above in your browser using DataLab