Skip to content

weights argument in the lmer function in lme4

1 message · Spencer Graves

#
I agree:  The lmer weights argument seems not to have any effect.  To 
check this, I modified the first example in the "lmer" documentation as 
follows:

Sleep <- sleepstudy
Sleep$wts <- 1:180
(fm1 <- lmer(Reaction ~ Days + (Days|Subject), Sleep))
(fm1w <- lmer(Reaction ~ Days + (Days|Subject),
                      weights=wts, Sleep))

	  The numbers from both seemed to be the same.  To try to help diagnose 
this, I listed "lmer", and found that it consisted of a call to 
"standardGeneric".  Then 'getMethods("lmer")' listed only one "method" 
for the case where the argument "formula" had class "formula".  I tried 
to trace this further, e.g., by giving it a different name and using 
"debug".  After being stopped a couple of time by functions hidden in 
the "Matrix" namespace, I gave ups.

	  However, at least you know that it's not you.  And I've included Doug 
Bates as a "cc" so he can use this info as he sees fit.

	  hope this helps.
	  spencer graves
	
 > sessionInfo()
R version 2.2.1, 2005-12-20, i386-pc-mingw32

attached base packages:
[1] "methods"   "stats"     "graphics"  "grDevices" "utils"     "datasets"
[7] "base"

other attached packages:
      lme4   lattice    Matrix
"0.995-2" "0.12-11" "0.995-4"
 >
Patrick Connolly wrote: