Skip to content

Instantly share code, notes, and snippets.

@aaronberdanier
Created September 14, 2012 12:55
Show Gist options
  • Save aaronberdanier/3721756 to your computer and use it in GitHub Desktop.
Save aaronberdanier/3721756 to your computer and use it in GitHub Desktop.
response <- cbind(matrix(y,ncol=1),rep(1,n*t)-matrix(y,ncol=1)) # response matrix for GLM
# y ~ Bin(1,p)
# logit(p) = xB
model <- summary(glm(response~rep(x,n),binomial(link=logit)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment