in_interaction: Determine if a predictor is involved in an interaction

View source: R/model_utils.R

in_interactionR Documentation

Determine if a predictor is involved in an interaction

Description

This presently does not work for any term like poly(x, 3) or I(x^2), since the terms object contains those names, not the names of the underlying predictors.

Usage

in_interaction(formula, predictor)

Arguments

formula

Model formula

predictor

Predictor to check for, as character vector

Value

TRUE if in an interaction, FALSE otherwise


regressinator documentation built on Sept. 11, 2024, 6:50 p.m.