The Visual World
Data analysis for "visual world" experiments
The Visual World | Weighted empirical logit regression in R: A bug you should know aboutWeighted empirical logit regression in R: A bug you should know about
Tue 09 Oct, 2007 at 3:07 PM
Update Jan 23 2009: The bug noted below was fixed as of version 0.999375-27 of the R package lme4. It is no longer necessary to use lmer2; instead, you should upgrade to the most current version of lme4 (which as of this writing is 0.99375-28) and use the function lmer.
When running an weighted empirical logit regression, it is suggested to weight each observation by 1/v, where v = 1/(y+.5) + 1/(n-y+.5) (Gart & Zwiefel, 1967; McCullagh & Nelder, 1989). In the current implementation of the R function lmer (lme4 version 0.99875-8), the "weights" option of the lmer function has no effect. (I have tried and verified this result myself). However, the development version of the lmer function, called lmer2, seems to weight the observations properly. So I recommend using lmer2 instead of lmer until this problem is corrected.
Posted Tue 09 Oct, 2007 at 3:07 PM | Link | Comments (4)
Disclaimer: The purpose of the website
is to offer possible solutions for analyzing data from visual world
experiments, and to encourage discussion/criticism of those solutions.
I am not a statistician, and the advice presented on this website
should be taken as just that—advice. It has not been subject to
peer review, it may contain errors (which I hope that commentary from
others will correct), and may be revised in the future.