data(mtcars)
m <- lm(mpg ~ wt + cyl + vs, data = mtcars)
n_obs(m)
if (require("lme4")) {
data(cbpp, package = "lme4")
m <- glm(
cbind(incidence, size - incidence) ~ period,
data = cbpp,
family = binomial(link = "logit")
)
n_obs(m)
n_obs(m, disaggregate = TRUE)
}
Run the code above in your browser using DataLab