-----Original Message-----
From: r-sig-mixed-models-bounces at r-project.org [mailto:r-sig-mixed-models-
bounces at r-project.org] On Behalf Of Luana Marotta
Sent: Tuesday, February 01, 2011 2:24 PM
To: R-SIG-Mixed-Models; Douglas Bates
Subject: [R-sig-ME] Lmer binomial distribution x HLM Bernoulli distribution
Dear R-users,
I'm running a lmer model using the lme4 package. My dependent variable is
dichotomous and I'm using the "binomial" family. The results
are slightly different from the HLM results based on a Bernoulli
distribution. Please, see the results below:
Level 1 info: Size: 129006 Mean: 0.7082 (dichotomous variable 0/1)
Level2 info: Size: 384
*HLM model:*
Distribution at Level-1: Bernoulli
Level-1 Model
Prob(Y=1|B) = P
log[P/(1-P)] = B0
Level-2 Model
B0 = G00 + U0
*HLM results:*
Random effects:
Groups Name Variance Std.Dev.
schid (Intercept) 0.17727 0.42104
Fixed effects:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 1.001561 0.023039 43.473 0.000
*R model:*
lmer(measurebi_general ~ 1 + (1 | schid), data=data_valid_general,
family=binomial)
*R results:*
AIC BIC logLik deviance
153195 153214 -76595 153191
Random effects:
Groups Name Variance Std.Dev.
schid (Intercept) 0.18007 0.42434
Fixed effects:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 1.0071 0.0232 43.41 <2e-16 ***
Is there anyway that I can adapt my R model so that the R results are the
same as the HLM results?
I'm using the lme4 for linear data and the R results are exactly the same as
the ones produced by HLM. It is very important for me to have both results
the same because I'll be discussing the results with researchers who use
exclusively the HLM software.
Thank you,
Luana Marotta
[[alternative HTML version deleted]]