Returns the name(s) of the response variable(s) from a model object.
find_response(x, combine = TRUE)
| x | A fitted model. |
|---|---|
| combine | Logical, if |
The name(s) of the response variable(s) from x as character vector.
library(lme4) data(cbpp) cbpp$trials <- cbpp$size - cbpp$incidence m <- glm(cbind(incidence, trials) ~ period, data = cbpp, family = binomial) find_response(m, combine = TRUE)#> [1] "cbind(incidence, trials)"find_response(m, combine = FALSE)#> [1] "incidence" "trials"