[R] random effects using lmer

HughSt hughsturrock at hotmail.com
Tue Apr 17 23:26:49 CEST 2012


Hi,

I am trying to run a logistic regression to look at the risk of malaria
infection in individuals. I want to account for intra household correlation
and so want to include a household level random effect. I have been using
the lmer command in lme4 package but am getting some strange results that
are completely different to those I get using STATA.

Can I just check that this is the correct code

lmer(IsPos ~  Dist + (1 | HouseID), family=binomial)

Where IsPos is a binary vector of positives and negatives, Dist is the
variable of interest and HouseID is the household ID number.

For those STATA users, the equivalent I'm using is

xtlogit IsPos Dist, i(HouseID)

Any help would be much appreciated..!

Thanks!
Hugh

--
View this message in context: http://r.789695.n4.nabble.com/random-effects-using-lmer-tp4566030p4566030.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list