Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: nlogitrum and nlogit: unbalanced data


From   John Fulton <[email protected]>
To   [email protected]
Subject   Re: st: nlogitrum and nlogit: unbalanced data
Date   Tue, 09 Jan 2007 16:03:19 -0500

Richard Gates suggested modifying nlogitrum to remove a trap
Dear Richard,
Thank you very much.
Does nlogitrum call the current version of nlogit, subject to the trap? Or does nlogitrum have access to an older version of nlogit, somehow?
In other words, is there anything I would be giving up by going with nlogitrum's version of nlogit?
I'm obviously thinking of "inside-Stata" stuff, like speed increases since 7, for example, or something else that might not show up in the nlogit version changelogs?

Because I could (at least in principle) use the Koppelman-and-Wen constraint of equality of IV parameters to produce a RUM-consistent estimation.

Again, thank you very much,
John.

references:
nlogitrum: Heiss, "net sj 2-3 st0017", though you could "search nlogitrum".
K+W: Transportation Research. B, Vol. 32, No. 5, pp. 289-298, 1998
also see Hunt, Journal Of Regional Science, Vol. 40, NO. 1,2000, pp. 89-113)




John Fulton is inquiring about the "unbalanced data" error message from
-nlogitrum-.

There is an error trap in -nlogitrum- to check that the alternatives for each
case (individual) are balanced. This error trap is unnecessary. The code in
-nlogitrum- is based on the Stata 7 release of -nlogit-. Since then we (at StataCorp) have determined the restriction that each case must have the
same set of alternatives is unnecessary and we have removed it from -nlogit-.

John, if you are feeling up to a bit of programming you can copy nlogitrum.ado
to your working directory and modify it. You can find where -nlogitrum-
resides using the stata command

. which nlogitrum

It is probably in your personal ado directory.
You will see in the ado code a call to the local program -ChkDta- on line 78.
Comment out this line.
Your ado path will have the working directory ahead of the personal directory.
To check your ado path use

. adopath

Clear the original version of -nlogitrum- from memory using

. program drop _all

then try running your model again.

Alternatively, you could copy nlogitrum.ado to mynlogitrum.ado and
change the program name within the file to mynlogitrum.ado.
Be sure to constrain the inclusive-valued (dissimularity) parameters to 1
for the degenerate nests in the RUM model otherwise you will not get convergence. I do not believe the IV parameters exist for the RUM
model in this case. They are identifiable in the Nonnormalized model
if you have an alternative specific variable (maybe var1 in your model
specification).

Best Regards

-Rich
[email protected]
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index