1

I am looking at an lmer model that's been coded, and I don't quite understand what the -1 is / is doing. The code looks like fit = lmer(resids ~ -1 + (1|loc/time))

I believe the (1|loc/time) piece can be equivalently written as (1|loc) + (1|loc:time), which is a random intercept of loc, and a random intercept of time varying within loc.

Now the part I don't quite get: the -1, which I think has to do with the mean. The only place I have found that has anything on using a -1 in that spot (as opposed to 1 or leaving it blank) is on page 7 of Fitting Linear Mixed-Effects Models using lme4. The table here shows it in conjunction with offset(o), which is used "to specify that a random intercept has a priori known means". So, my gut says that leaving the offset(o) out would be the same as using offset(0) (number 0 not character o), which would mean the a priori means are all 0.

Is this correct?

Ben Bolker
  • 211,554
  • 25
  • 370
  • 453
Ryan S
  • 73
  • 6

1 Answers1

0

Yes, this sets the fixed-effect component of the model to exactly zero. While it is legal, this is a moderately strange model; I hope that whoever has coded it knows what they're doing. I can only think of two reasons you would fit a model with an empty fixed-effect component:

  • for some reason you want to do a likelihood ratio test for the significance of the intercept (this is unusual, in most cases the intercept is not of particular statistical interest)
  • you have a particular experimental design where the mean is known a priori to be zero (e.g. your response variable is some kind of difference between two elements that have been randomized to be exchangeable).
lmer(Reaction ~ -1 + (Days|Subject), sleepstudy)
Linear mixed model fit by maximum likelihood  ['lmerMod']
Formula: Reaction ~ -1 + (Days | Subject)
   Data: sleepstudy
      AIC       BIC    logLik  deviance  df.resid 
1840.7814 1853.5532 -916.3907 1832.7814       176 
Random effects:
 Groups   Name        Std.Dev. Corr
 Subject  (Intercept) 252.53       
          Days         11.93   0.88
 Residual              25.59       
Number of obs: 180, groups:  Subject, 18
No fixed effect coefficients
Ben Bolker
  • 211,554
  • 25
  • 370
  • 453