John Fulton <[email protected]> wrote:
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".
Because you didn't seem to use -nlogitdn- but have a degenerate nest,
I guess that is the problem. Please provide a do-file that reproduces
the problem, e.g. using the Stata restaurant data, because I'm not
sure what exactly you typed.
Anders Alexandersson
[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/