interaction_detector {gdverse}R Documentation

interaction detector

Description

Identify the interaction between different risk factors, that is, assess whether factors X1 and X2 together increase or decrease the explanatory power of the dependent variable Y, or whether the effects of these factors on Y are independent of each other.

Usage

interaction_detector(y, x1, x2)

Arguments

y

Dependent variable, continuous numeric vector.

x1

Covariate X_1, factor, character or discrete numeric.

x2

Covariate X_2, factor, character or discrete numeric.

Value

A list.

Variable1 Q-statistics

Q-statistics for variable1

Variable2 Q-statistics

Q-statistics for variable2

Variable1 and Variable2 interact Q-statistics

Q-statistics for variable1 and variable2 interact

Interaction

the interact result type

Author(s)

Wenbo Lv lyu.geosocial@gmail.com

Examples

interaction_detector(y = 1:7,
                     x1 = c('x',rep('y',3),rep('z',3)),
                     x2 = c(rep('a',2),rep('b',2),rep('c',3)))


[Package gdverse version 1.0.0 Index]