Hi Ilkka,
You have an excellent eye. This may be a bug, but I cannot say this with complete
certainty until further investigation. That is, the variables may simply be named
differently between Gary's paper and the relogit implementation.
I will look into the discrepancy between documentation and the source code, and see if
there is an obvious resolution to the matter.
Is this indeed a bug or have i missed something?
I don't think you missed anything. In principle, the relogit model's
implementation should mirror Gary King's paper.
Thanks!
Matt
e: mowen(a)iq.harvard.edu
p: 6-6132
On May 24, 2011, at 9:11 AM, Anttila Ilkka wrote:
> Dear all,
>
> I ran into some strange results when using Zelig's 'relogit' when
using weighting as case correction. The resulting coefficients differed vastly from the
ones calculated using normal logistic regression. I believe the problem is in the
'relogit.R' code in the line 70 which is part of the bias correction:
> xi <- 0.5 * Qdiag * ((1+w0)*pihat-w0)
>
> At least according to "King & Zeng (2001): Logistic regression in Rare
Events Data" the correction should instead be:
> xi <- 0.5 * Qdiag * ((1+w1)*pihat-w1)
> This is also the way the model has been documented in the Zelig manual (except for a
tiny typo in the subscript, there is w-1 instead of w_1).
>
Is this indeed a bug or have i missed something?
> Best,
> Ilkka
>
> Ilkka Anttila
> Research assistant, Institute of Strategy
> Aalto University School of Science
>