Hi Thierry,

I think it should be possible to generate such correlated data using a mixed 
model approach:


1) Generate pairs of correlated linear predictor values using an ordinary 
linear mixed
model setup (for example using rnorm() repeatedly)

2) Back-transform these values using the inverse logit (or similar link 
function) to
obtain probabilities

3) Draw binomial responses using the probabilities from 2) (using rbinom())


You may need to use trial-and-error to get the right amount of correlation.


Christian

______________________________________________
R-help@r-project.org 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.

Reply via email to