Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Trouble with mixlogit (error) with binary dependent variable


From   Arne Risa Hole <[email protected]>
To   [email protected]
Subject   Re: st: Trouble with mixlogit (error) with binary dependent variable
Date   Wed, 30 Jan 2013 11:36:42 +0000

Sam

-mixlogit- is a user-written command available from SJ/SSC.

You've defined the group variable incorrectly - this should be an
identifier of the choice sets, not the alternatives within a choice
set. See the examples in
http://www.stata-journal.com/article.html?article=st0133.

There might be other problems with the way you've set up the data too
but this is hard to know without seeing a snippet of the data. Have
you tried running the model using -clogit- first? If this doesn't work
you can be 100% sure that -mixlogit- won't either.

Arne (author of -mixlogit-)

On 30 January 2013 00:55, SAM MCCAW <[email protected]> wrote:
> Dear STATA gurus,
>
> I am having trouble running a mixed logit model. Please help!
>
> - The dependent variable is binary (0,1) (innovation).
>
> - My independent variables (var1 var2 var3) are continuous variables
> (they are logs of a count, excluding 0).
>
> -The group variable just takes a value of 1 or 2, because I only have
> two choice occasions, using: egen group = group(innov_1)
>
> - Code: mixlogit innov, group(group) rand(var1 var2 var3) id(id) or
>
>          mixlogit innov var4, group(group) rand(var1 var2 var3 var5) id(id)
>
> I am getting the following errors:
>
> [P]     error . . . . . . . . . . . . . . . . . . . . . . . . Return code 2000
>         no observations;
>         You have requested some statistical calculation and there are
>         no observations on which to perform it.  Perhaps you specified
>         if exp or in range and inadvertently filtered all the data.
>
> (end of search)
>
> I have over 30,000 for all the variables specified in the simplest
> model I ran and I still get the same error.
>
> Here are the sumamry statistics for my variables:
>
>     Variable |       Obs        Mean    Std. Dev.       Min        Max
> -------------+--------------------------------------------------------
> innov_1       |     32523    .4774467    .4994988          0          1
> var1            |     33065    2.104231    1.589854          0   4.859812
> var2            |     33065    1.669999      1.0031            0   4.060443
> var3            |     33065    .6736071    .9022467          0    3.78419
> var4            |     33065    2.141496    2.795201          0   9.953027
> -------------+--------------------------------------------------------
> var5            |     28893    1.506202    .9606917          0   3.295837
> var6            |      5953   -2.335463    1.106637   -4.60517    1.96611
>
> I am completely lost about what to do next.
>
> Thanks for your help.
>
> SAM
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/statalist-faq/
> *   http://www.ats.ucla.edu/stat/stata/
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index