Hello, Isn't the same question posted on stackoverflow (http://stackoverflow.com/questions/11705062/generating-beta-binomial-responses-with-covariates)? I guess you got the answer there.
In general, cross-posting is not that preferred in R. A.K. ----- Original Message ----- From: Anamika Chaudhuri <[email protected]> To: [email protected] Cc: Sent: Saturday, July 28, 2012 6:28 PM Subject: [R] Beta-Binomial Regression in R Hi All: I am trying to generate Beta-Binomial data with regressors using R. I have used the following code to generate Beta-Binomial data. Now I want to add a covariate to the equation. I would then like to use the simulated data to run the Beta-Binomial model with covariates on it. Appreciate any help. set.seed(111) k<-20 n<-60 x<-NULL p<-rbeta(k,3,3)# so that the mean nausea rate is alpha/(alpha+beta) for(i in 1:k) x<-cbind(x,rbinom(300,n,p[i])) Thanks Anamika [[alternative HTML version deleted]] ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

