lm(hp ~ mpg + factor(cyl) + disp:hp, mtcars) |>
model_list_higher_order_variables()
mod <- glm(
response ~ stage * grade + trt:stage,
gtsummary::trial,
family = binomial
)
mod |> model_list_higher_order_variables()
mod <- glm(
Survived ~ Class * Age + Sex,
data = Titanic |> as.data.frame(),
weights = Freq,
family = binomial
)
mod |> model_list_higher_order_variables()
Run the code above in your browser using DataLab