[R-sig-ME] completely nested glmer

Troels Ring tring at gvdnet.dk
Wed Aug 30 10:15:33 CEST 2017

Dear friends - I have a question which is  basic and probably simple but 
disturbing  to me. I am on Windows 7 or 10, R version 3.4.1 (2017-06-30) 
-- "Single Candle"

I have 2013 measurements of capillary flow speed obtained from 204 
glomeruli originating from 29 rats, 10 of whom are controls, 11 made 
diabetic, and 8 made hyperglycemic otherwise.  Altogether I have 621 
capillaries from controls, 964 from diabetics and 428 from hyperglycemic.

If I make a direct aov

summary(z2 <- aov(Speed~TRT,SCAN))
#                 diff         lwr         upr     p adj
#Diab-Ctrl  -0.4266708 -0.65092625 -0.20241526 0.0000255
#Hyper-Ctrl -0.2206938 -0.49449343  0.05310581 0.1416500
#Hyper-Diab  0.2059769 -0.04716959  0.45912348 0.1365243

and a similar result is obtained with kruskal.test

I happen to know the flow is approximately gamma distributed and

summary(z1a <- glm(Speed~TRT,SCAN,family=Gamma)) where TRT is the three 
level factor, leaves me a significant effect of diabetes

However, as it is, glomeruli are nested within rats, and rats are by 
design nested within one of the three groups

Hence I make

summary(z3a <- glmer(Speed~TRT + (1|RAT)+(1|ind) + (1|RAT:ind) 
,data=SCAN,family=Gamma)) where ind is an indicator for each of the 204 
glomeruli. And the fixed effect TRT is not significant.

But taking into account that RAT is nested within TRT leaves me 
something like

summary(z77 <- glmer(Speed~ 1 +(1|TRT/RAT/ind) ,data=SCAN,family=Gamma)) 
which fits without protests and gives me

Random effects:
  Groups        Name        Variance Std.Dev.
  ind:(RAT:TRT) (Intercept) 0.003839 0.06196
  RAT:TRT       (Intercept) 0.001479 0.03846
  TRT           (Intercept) 0.000000 0.00000
  Residual                  0.237689 0.48753
Number of obs: 2013, groups:  ind:(RAT:TRT), 204; RAT:TRT, 29; TRT, 3

which hardly indicates strong effect of TRT levels?

The results of the aov or first glm would fit expectations - but ignores 
the nesting. So is the mixed model wrong? (it looks reasonable from 
diagnostic plots)

Best wishes

Troels Ring
Aalborg, Denmark

More information about the R-sig-mixed-models mailing list