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