Skip to content
Back to formatted view

Raw Message

Message-ID: <49E8A687.2090303@life.ku.dk>
Date: 2009-04-17T15:55:51Z
From: Christian Ritz
Subject: Generate bivariate binomial data
In-Reply-To: <2E9C414912813E4EB981326983E0A1040656FEEC@inboexch.inbo.be>

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