[R-sig-ME] Fwd: Clarifications on implementation of lmer (lme4) in R -weights

Rodrigo Travitzki r.travitzki at gmail.com
Sun Jun 21 23:56:29 CEST 2015


Christian,
as far as I know (not much) the use of 'lm' weights is similar to 
'lmer', but not to 'lme' functions.
But you can use both of them, because the weight is a covariate of the 
variance.
Basically, if in lm you use *weights=n* , so in multilevel models:
/
//in lmer: *weights=n* /
/in lme: *weights=varFixed(~I(1/n))* //[inverse-variance weighting based 
on the number of samples per group]//
/
This was explained by Ben Bolker here:
https://stat.ethz.ch/pipermail/r-sig-mixed-models/2014q3/022570.html

Good Luck!
Rodrigo


 > *Christian Blanco* wrotes on /Tue Jun 9 23:25:43 CEST 2015/

> I did some testing between the lme and lmer (with REML estimator; random
> slope and intercept).

> Without any weights, I get the same estimates for lme and lmer. However,
> when I include a weight given by inverse of the sample size by ID. I get
> very different results.


	[[alternative HTML version deleted]]



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