set.seed(12345)
data <- data.frame(y = rbinom(50, 1, 0.7),
a = factor(sample(c(1, 2), 50, TRUE)),
b = factor(sample(c(1, 2, 3), 50, TRUE)))
agg_binomial(y ~ ., data)
Run the code above in your browser using DataLab