Statalist The Stata Listserver


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

st: nlogitrum and nlogit: unbalanced data


From   John Fulton <[email protected]>
To   statalist <[email protected]>
Subject   st: nlogitrum and nlogit: unbalanced data
Date   Sun, 07 Jan 2007 16:42:13 -0500

Hi Statalist. Thanks for all the wonderful help.
Here's a puzzler:
I ran a model using nlogit, but nlogitrum kicks up an "unbalanced data" error.
I've read Heiss's 2002 article but haven't gleaned much in the way of what the problem might be, let alone the solution.

I don't think I've made a syntax error, but I've included the relevant command lines below.
This model has a degenerate nest and three levels. My indepvars for the top two nests are dummy interactions between chooser-specific characteristics and the nest variable - as is done in the "restaurant" example - so "var2" is "var2*(middle==1)" for all values. Similarly, "var3" is "var3*(top==1)."

Here's the syntax for nlogitrum. It outputs the correct tree, then gives an "unbalanced data" error.
nlogitrum chosen var1 var2 var3 [fw=count], group(group_id) nests(bottom middle top)

Here’s the nlogit command that works:
nlogit chosen (bottom=var1) (middle=var2) (top=var3) [fw=count] , group(group_id)


NB that my "levels" are reverse coded from stata's, so that "altsetb" variable is my "1" level, altset2 is "2" and altset1 is "3".

Thank you,
John.



*
* 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