I'm trying to fit a (simple) linear regression using MZ twin data. The reason why mixed-effects are used here is just to correct for correlated responses from the twins.

The current model looks like this:

out.fit.1 <- lmer(outcome ~ cov1 + cov2 + cov3 + predictor + (1 | PairNumber ),  
                     data = MZtwins1 )

The 3rd covariate is a dummy variable for diagnostic status (healthy/affected); hence there are "concordant", "discordant" and "healthy" pairs.

Taking into account that concordant pairs may have a strong genetic influence in their diagnostic status (ie, the disease might have been caused by genes) and that the "affected" status of a twin in a discordant pair is likely due to environmental factors, I'm wondering how to include this in the model.

I've been considering using

out.fit.2 <- lmer(outcome ~ cov1 + cov2 + cov3 + cov4 + predictor + (1 | PairNumber ),  
                     data = MZtwins1 )

where cov4 would be a categorical variable for concordant/discordant/healthy... But the fact that cov3 already contains the diagnostic status makes it look overparametrized.

EDIT: cov3 has only two levels ("affected", "healthy"), and cov4 (as I've thought about it) would have three levels ("healthy_pair", "concordant_pair", "discordant_pair").

Do you have any ideas on how to model this?


A standard sort of dummy-variable setup would be something like:

           cov3 cov4
healthy       0    0
concordant    1    0
discordant    0    1
  • $\begingroup$ Yes, indeed. But as cov3's class is factor, R handles it as a dummy variable by default. I'm editing the original question so as to include more details... $\endgroup$ – Elabore May 13 '13 at 8:39
  • 2
    $\begingroup$ Okay, I see. You cannot have both cov3 and cov4 (as you have defined them) in the model at once, because one way or another you are going to end up with one column of the design matrix being a perfect linear combination of the other columns... as you say, the model is overparameterized. You can verify this by attempting to do it and noting what happens (the model will fail with an obscure-looking error message). The solution is to remove cov3 and just use cov4, giving you essentially the set of codes that I posted, although with different column names. $\endgroup$ – Jake Westfall May 13 '13 at 9:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.