jhelvy / logitr

Fast estimation of multinomial (MNL) and mixed logit (MXL) models in R with "Preference" space or "Willingness-to-pay" (WTP) space utility parameterizations in R
https://jhelvy.github.io/logitr/
Other
42 stars 15 forks source link

Incorporate proper panel log-likelihood calculations #11

Closed crforsythe closed 3 years ago

Schroeerbernd commented 3 years ago

Hey John, I estimate a mixedlogit with your package, which works fine so far. Now I want to estimate panel data, but that doesn't seem to work yet, right? My problem is that I integrate the voting decisions via obsIDName, but not the respondent: obsidName='Case'. Is it possible to implement panel data via clusterName='respondant_ID'?

jhelvy commented 3 years ago

Right now the log-likelihood is not yet correctly computed for repeated observations from the same individual, so if that is your situation (it sounds like it is), then your results will not be quite correct for mixed logit. We're working on implementing this and will hopefully have it incorporated soon. The issue is the calculation of the log-likelihood itself rather than about clustering the standard errors. You can see more about how we will implement this in Section 6.7, pg. 145-146, in Chapter 6 of Train's book.

Schroeerbernd commented 3 years ago

Ok, I got that, I'll look at the chapter in Train's book. Thanks for your quick reply.