Reputation: 1
I want to build a GLM data, but I have aggregated count data, instead of individual 0/1 data.
I can do it in R, How to do it in Python?
data <- data.frame(n = c(1000000, 20000000), x = c(2003, 24455), group = as.factor(c("Control", "Treated")))
model <- glm(cbind(x, n - x) ~ group, data = data, family = binomial(link=log))
summary(model)
Upvotes: 0
Views: 23