[R-sig-ME] Constraining error variance to 0 in an lmer() model.

Rolf Turner r.turner at auckland.ac.nz
Sun Mar 25 10:39:27 CEST 2018

On 25/03/18 12:40, Rolf Turner wrote:


> The model that I wanted to fit was (adapting Maarten Jung's notation 
> slightly to suit my own tastes):
>      (*) lmer(test ~ 0+person + (0+person | occasion),data=Dat)


Berwin Turlach has just pointed out to me that I got the preceding 
expression arse-backwards, as is so often my propensity.  It should

     (*) lmer(test ~ 0+occasion + (0+occasion | person),data=Dat)

The fixed effect is *occasion* and the random effect is *person*.


>      lmer(test ~ 0+person + (0+person | occasion),data=Dat,
>                  control=lmerControl(check.nobs.vs.nRE = "ignore"))

should be

       lmer(test ~ 0+occasion + (0+occasion | person),data=Dat,
                   control=lmerControl(check.nobs.vs.nRE = "ignore"))

Psigh!  Sorry for the confusion, everybody.



Rolf Turner

P.S.  Berwin also asked me to provide the data I used.  I simply took 
the data provided by Ben Pelzer, in a posting in the relevant thread, 
just before the posting in which Maarten Jung explained how to get the 
fit to run, by setting the appropriate control variable.

For the record, Ben Pelzer provided the data through a URL:

> Dat <-
> read.table(url("https://surfdrive.surf.nl/files/index.php/s/XfE3mtbFCTUejIz/download"),
> header=TRUE)

(Actually Ben Pelzer wrote "mydata" where I have written "Dat" above.  I 
*refuse* to use this "mydata" construction since it is *so*
Micro$oft! :-) )

R. T.

Technical Editor ANZJS
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276

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