# How to do binary logistic regression on people (couples) clustered within homes?

I am looking at the relationship between housing characteristics and a health outcome. To make the example simple, I have data for a continuous predictor (exposure) collected from 1000 homes and health outcomes S (a binary outcome) for 2000 people (1000 couples) living in each of those homes. I would like to look at the relationship between S and E using binary logistic regression. Apart from sharing the same exposure, there is no mechanistic reason to believe that status of partner 1 in the couple can affect the status of partner 2 e.g. its not a transmissible disease etc.

Can I do an ordinary logistic regression? Or must I take into account the fact that people are clustered within homes? If so, why? What syntax would be appropriate in Stata, xtlogit with i(house)? or some kind of xtmixed?

Many thanks

• Is it possible to observe $(0,1)$ or $(1,0)$ as an outcome or both members always have the same binary outcome?
– user10525
Commented Jun 18, 2012 at 12:05
• @Procrastinator: Given that the outcome is a non-transmissible disease, it seems reasonable to assume that members of the same household can have differing outcomes. Commented Jun 18, 2012 at 12:39
• xtmixed is intended for continuous data; you need to use xtlogit or xtmelogit with binary data. Commented Sep 19, 2012 at 4:16

For me, this sounds like a (more or less typical) dyadic data set and I would definitely control for dyadic dependencies (i.e. at the houshold level) via multilevel/structural equation modeling.

David Kenny owns a great website on Dyadic Analysis. He also is co-author of a book on Dyadic Data Analysis that is highly recommanded.

Since you seem to use Stata, I would use the xtmelogit command (see here for more information).

• I can't see how this is a dyadic data... The dependent variable isn't related to the relationship of a couple. It seems perfect for a hierarchical model to me (aka random effects, like the one suggested by jthetzel). Commented Oct 16, 2012 at 1:57
• @Manoel Galdino: "The dependent variable isn't related to the relationship of a couple". Well, that's an empirical question, isn't it? At least, both share the same risk ("predictor (exposure) collected from 1000 homes"). Also, I agree that you could use a hierarchical model (aka multilevel model) but a SEM also works fine (especially if you have distinguishable dyads). Commented Oct 16, 2012 at 4:55

One assumption of fixed-effects general linear models (e.g. "ordinary" logistic regression) is that observations are independent of each other. However, there is likely some dependency in the observations in your study. For example, two people living in the same household are more likely to have similar diets and similar levels of physical activity than two people living in separate households.

I would consider modelling the data using either a logistic or Poisson mixed-effects model. The fixed effects would be your measured exposure covariates. The random effect would be the household. I am not particularly famililar with Stata's mixed effects syntax. In R, for a logistic mixed-effects model, I would call glmer(outcome ~ exposure1 + exposure2 + (1|household), data = study.data, family = binomial). A quick Google search suggests that the equivalent in Stata would be xtmelogit outcome exposure1 exposure2 || household.

I see two possibilities. One would be to apply separate models (one for the female and one for the male member of the couple). The second possibility would be to have one model with an indicator variable to distinguish the male member from the female member of the couple.

• What is wrong with this answer? Commented Jun 19, 2012 at 5:17
• Why do you ask that? Due to the fact that no one up voted it? I wouldn't say it's wrong, I just think it's not particularly helpful to deserve an up vote. For example, your second suggestion is just a fixed effect model and it would be better if you pointed so. Also, you could argue why it would be better than the random effects suggested above. This would deserve an up vote, at least by me. Commented Oct 18, 2012 at 17:58