# Random effect with zero variance

I measured explorative behaviour of 29 individuals repeatedly (at least twice) since I’m interested in how consistent they are through time. It seems, based on the attached plot, that there are clear differences between individuals in exploration. However, when I use a Linear mixed effect model with ID as a random variable

Model1<-lmer(Explo~1+(1|ID) ,data=OnlyMJ)


Linear mixed model fit by REML t-tests use Satterthwaite approximations to degrees of freedom [lmerMod] Formula: Explo ~ 1 + (1 | ID) Data: OnlyMJ

REML criterion at convergence: 254.5

Scaled residuals: Min 1Q Median 3Q Max -1.0565 -0.6838 -0.1794 0.3894 4.0976

Random effects: Groups Name Variance Std.Dev. ID
(Intercept) 0.000 0.00 Residual 2.754 1.66
Number of obs: 66, groups: ID, 30

Fixed effects: Estimate Std. Error df t value Pr(>|t|) (Intercept) -0.02594 0.20428 65.00000 -0.127 0.899 The random effect (between individual variance in exploration) is zero. This seems very weird and I can’t explain this. I have no idea what the problem is.

• What output do you get from ranef(Model1)? Sep 8 '16 at 14:27
• see tinyurl.com/glmmFAQ, search for "random effect variances estimated as zero" ... Sep 8 '16 at 14:29
• These boxplots are deceptive, because almost all are representing only two values!
– whuber
Sep 8 '16 at 14:50

You say that each individual had at least two measurements, but from your output there are only 66 observations on 30 individuals, so only six individuals (at most) had more than two measurements. Two is the absolute minimum you need to calculate a mean and a standard distribution -- the random intercept is assumed to be a Normal distribution -- which will have a LOT of uncertainty. Looking at the plot, you have at least five individuals with essentially zero variance, and at least five individuals with a HUGE variance (probably caused by only two observations each).

I'd say you have too little data that's too noisy. The "clear" differences you see are mostly illusory because of the lack of data resulting in huge swings.  