
Test for significant interactions between variables
Source:R/interactions.R
tl_test_interactions.RdTest for significant interactions between variables
Usage
tl_test_interactions(
data,
formula,
var1 = NULL,
var2 = NULL,
all_pairs = FALSE,
categorical_only = FALSE,
numeric_only = FALSE,
mixed_only = FALSE,
alpha = 0.05
)Arguments
- data
A data frame containing the data
- formula
A formula specifying the base model without interactions
- var1
First variable to test for interactions
- var2
Second variable to test for interactions (if NULL, tests var1 with all others)
- all_pairs
Logical; whether to test all variable pairs
- categorical_only
Logical; whether to only test categorical variables
- numeric_only
Logical; whether to only test numeric variables
- mixed_only
Logical; whether to only test numeric-categorical pairs
- alpha
Significance level for interaction tests