jwdink / eyetrackingR

This package is designed to make dealing with eye-tracking data easier. It addresses tasks along the pipeline from raw data to analysis and visualization.
http://eyetrackingr.com
Other
82 stars 20 forks source link

Error in Weights calculation? #69

Open scottrjackson opened 4 years ago

scottrjackson commented 4 years ago

In familiarizing myself with the way that the Weights are supposed to work, I noticed that the reference points to this page: http://talklab.psy.gla.ac.uk/tvw/elogit-wt.html

But the formula for the weights given there is Weights = 1/(y + .5) + 1/(N - y + .5)

Which produces a distribution which is symmetrical around proportions of .5, which as I understand it fits with the rationale of weights, namely that the variance of the empirical log estimate is greater close to proportions of 0 or 1.

However, on line 55 of helpers.R, it looks like the formula is rather: Weights = 1/(y + .5) / 1/(N - y + .5)

Which means that it's just the exp() of the Elog value. Again, if I'm understanding, that would mean that proportions closer to 1 get weighted more, which does not seem to be the point of the weights here.

So... unfortunate typo (substituting a / for a +), or have I misunderstood?

Thanks!