[R] GLM, LMER, GEE interpretation
Daniel Malter
daniel at umd.edu
Mon Jul 7 09:48:53 CEST 2008
Hi, my dependent variable is a proportion ("prob.bind"), and the independent
variables are factors for group membership ("group") and a covariate
("capacity"). I am interested in the effects of group, capacity, and their
interaction. Each subject is observed on all (4) levels of capacity (I use
capacity as a covariate because the effect of this variable is normatively
linear). I fit three models, but I am observing differences between the
three.
The first model is a quasibinomial without any subject effects using glm.
The second is a random-effects model using lmer. The third model is a
generalized estimating equation using gee from the gee package in which I
cluster for the subject using an unstructured correlation matrix. The
results of the first and the third model almost coincide, but the second,
using lmer, shows an insginficant coefficient where I would expect a
significant one. The other 2 models show the coefficient significant. I do
not really have experience with gee. Therefore I apologize in advance for my
ignorant question whether one of lmer and gee is preferable over the other
in this setting?
Thanks for any advice,
Daniel
Below is the output of the three models.
-----
GLM
-----
Call:
glm(formula = prob.bind ~ capacity * group, family = quasibinomial,
subset = c(combination == "gnl"))
Deviance Residuals:
Min 1Q Median 3Q Max
-18.9843 -4.1129 0.3816 6.0047 18.1858
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -3.4274 0.4641 -7.386 1.10e-12 ***
capacity 0.9931 0.1281 7.754 9.55e-14 ***
group2 0.7242 0.6337 1.143 0.25392
group3 2.0264 0.6168 3.286 0.00112 **
capacity:group2 -0.1523 0.1764 -0.863 0.38864
capacity:group3 -0.3885 0.1742 -2.231 0.02633 *
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for quasibinomial family taken to be 39.01488)
Null deviance: 22672 on 359 degrees of freedom
Residual deviance: 15813 on 354 degrees of freedom
AIC: NA
Number of Fisher Scoring iterations: 5
-----
LMER
-----
Generalized linear mixed model fit using Laplace
Formula: prob.bind ~ capacity * group + (1 | subject)
Subset: c(combination == "gnl")
Family: quasibinomial(logit link)
AIC BIC logLik deviance
11082 11109 -5534 11068
Random effects:
Groups Name Variance Std.Dev.
subject (Intercept) 42.977 6.5557
Residual 26.845 5.1813
number of obs: 360, groups: subject, 90
Fixed effects:
Estimate Std. Error t value
(Intercept) -3.8628 1.2701 -3.041
capacity 1.1219 0.1176 9.542
group2 0.9086 1.7905 0.507
group3 2.3700 1.7936 1.321
capacity:group2 -0.1745 0.1610 -1.083
capacity:group3 -0.3807 0.1622 -2.348
Correlation of Fixed Effects:
(Intr) capcty group2 group3 cpct:2
capacity -0.322
group2 -0.709 0.228
group3 -0.708 0.228 0.502
capcty:grp2 0.235 -0.730 -0.310 -0.167
capcty:grp3 0.233 -0.725 -0.166 -0.305 0.529
-----
GEE
-----
GEE: GENERALIZED LINEAR MODELS FOR DEPENDENT DATA
gee S-function, version 4.13 modified 98/01/27 (1998)
Model:
Link: Logit
Variance to Mean Relation: Binomial
Correlation Structure: Unstructured
Call:
gee(formula = prob.bind ~ capacity * group, id = subject,
subset = c(combination == "gnl"), family = binomial, corstr =
"unstructured")
Summary of Residuals:
Min 1Q Median 3Q Max
-0.8397112 29.7353417 59.2605133 89.2223581 99.8099842
Coefficients:
Estimate Naive S.E. Naive z Robust S.E. Robust z
(Intercept) -3.4798395 0.4910274 -7.0868545 0.4739913 -7.3415687
capacity 1.0149659 0.1366365 7.4282170 0.1284162 7.9037210
group2 0.7781014 0.6691731 1.1627806 0.7424769 1.0479807
group3 2.0720270 0.6527565 3.1742727 0.6234005 3.3237495
capacity:group2 -0.1750448 0.1877361 -0.9323982 0.2060484 -0.8495325
capacity:group3 -0.4021872 0.1865916 -2.1554413 0.1724780 -2.3318168
Estimated Scale Parameter: 39.28916
Number of Iterations: 3
Working Correlation
[,1] [,2] [,3] [,4]
[1,] 1.00000000 0.1632065 0.04525213 -0.08946253
[2,] 0.16320653 1.0000000 0.17635584 0.16703313
[3,] 0.04525213 0.1763558 1.00000000 0.22291895
[4,] -0.08946253 0.1670331 0.22291895 1.00000000
-------------------------
cuncta stricte discussurus
More information about the R-help
mailing list