Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error using "mixlogit" on Stata 13 and 15: "__00000Q not found"

    Hi,

    I'm trying to replicate my coauthor's findings this morning and cannot do so. He used Stata 11 and got results, while I can't get results using either Stata 13 on my laptop or Stata 15 on my desktop (remotely via a VPN). We're using the exact same .do file. The error I get is "__00000Q not found". I've searched for the error everywhere, but I can't find anything even remotely useful.

    The dataset covers a series decisions made by roughly 100 of people. Each decision has 3 choice alternatives (A, B, or C), each of which has a price and a corresponding value of X and Y. The only real variation within these across choices is for choice alternative B, where the price and the X and Y values change. That said, they do not always change, even within subject. (That is, each subject faces each decision multiple times.)

    The command of interest is:
    Code:
    mixlogit choice price if mixLogID==1 & Kink3Pnt==1 , rand(XX YY) group(choiceID)  id(SubjectID) cluster(SubjectID)
    Interestingly, if I instead interact "price" with a dummy variable for choice alternative B to create a variable I called "PB", then the command executes fine. Unfortunately, that's not the specification we need.

    I should add that I'm positive that the "group" and "id" variables are correct. We've been using the "mixlogit" command with a very different setup for quite a while and have had no problems. The same goes for the "mixLogID" and "Kink3Pnt" restrictions, too.

    Any help would be greatly appreciated!

    Best,
    Matt
    Last edited by Matt McMahon; 04 Aug 2017, 12:33.

  • #2
    You might try the numerical option. "numerical specifies that numerical gradients should be used instead of analytical gradients (the default). This option is useful for replicating the results from earlier versions of mixlogit but should otherwise not be used."
    -------------------------------------------
    Richard Williams, Notre Dame Dept of Sociology
    Stata Version: 17.0 MP (2 processor)

    EMAIL: [email protected]
    WWW: https://www3.nd.edu/~rwilliam

    Comment


    • #3
      Matt

      Try updating mixlogit by typing "ssc install mixlogit, replace" in Stata. If that does not help please send me an email off list (preferably with a do-file and dataset that reproduces the problem) and I will look into it.

      Arne (author of mixlogit)

      Comment


      • #4
        Originally posted by Richard Williams View Post
        You might try the numerical option. "numerical specifies that numerical gradients should be used instead of analytical gradients (the default). This option is useful for replicating the results from earlier versions of mixlogit but should otherwise not be used."
        I get the error r(1400): "initial values not feasible". Does that mean anything to you?

        Comment


        • #5
          Originally posted by Arne Risa Hole View Post
          Matt

          Try updating mixlogit by typing "ssc install mixlogit, replace" in Stata. If that does not help please send me an email off list (preferably with a do-file and dataset that reproduces the problem) and I will look into it.

          Arne (author of mixlogit)
          I just sent you an email about it. Thanks for your help!

          Comment


          • #6
            Matt sent me his data and do file and I ran it using two versions of Stata on different computers: in Stata/MP 15.0 it ran with no errors (although the model did not converge) while in Stata/SE 13.1 I obtained a similar error message to Matt's. Exploring further (using set trace on) the error message is issued by the ml command, which is used by mixlogit to maximise the simulated log-likelihood function.

            As explained here https://www.stata.com/support/faqs/w...rent-versions/ the ml command can produce slightly different results in different versions of Stata. I have never come across differences like this before, nor this particular error message, and can only speculate that it might have something to do with the limited variation in the data making the model very weakly identified and hence difficult to estimate.

            Arne

            Comment


            • #7
              Hi All,

              I am using Stata IC 16 to estimate a discrete choice model using mixlogit. I am encountering the error "__00000P not found" when I try to estimate the following model. Like Matt, I've searched for the error everywhere, and installed the latest version of mixlogit using "ssc install mixlogit, replace" but still haven't had success.

              The dataset includes choice decisions made by 60 people. Each decision has 3 generic (unlabeled) choice alternatives (alternative 1, alternative 2, and a status-quo alternative). Each alternative is composed of five attributes (price, distance, control, frequency, days). Alternatives 1 and 2 vary freely across choice sets, while the status-quo alternative is constant for each choice set (varying across individuals). Like Matt, I'm positive that the "group" and "id" variables are correct. I've been using the "mixlogit" command with no issue before this.

              Here is my code:

              Code:
               global randvars "distance control frequency days distance_population"
                           mixlogit y price if coop_distributor_foodhub=="Yes" & population!=., rand($randvars) group(gid) id(pid) nrep(500)
              In this case distance_population is an interaction between distance and county population. I get the same error when I swap this interaction for terms that interact population with control, frequency, or days.

              The model converges with no problem using the following code:

              Code:
               global randvars "distance control frequency days"
                           mixlogit y price if coop_distributor_foodhub=="Yes" & population!=., rand($randvars) group(gid) id(pid) nrep(500)
              It also runs successfully with an interaction between price and county population (price_population):

              Code:
               global randvars "distance control frequency days"
                           mixlogit y price price_population if coop_distributor_foodhub=="Yes" & population!=., rand($randvars) group(gid) id(pid) nrep(500)
              If you have any feedback, please let me know. Best,

              Julia

              Last edited by Julia Jones; 29 Jul 2019, 07:48.

              Comment


              • #8
                Julia

                One thing that you could check is the scaling of your variables - as Clyde Schechter wrote in another thread:

                Originally posted by Clyde Schechter View Post
                Convergence is harder to achieve when, say, one variable can be 10,000 times as large as another. Sometimes all that's needed to get convergence is to change the scale of one or a few variables so that all of the variables range over the same order of magnitude.
                You might also want to consider entering the interactions in your model as variables with fixed rather than random parameters, as you have done in the final specification.

                Arne
                Last edited by Arne Risa Hole; 31 Jul 2019, 08:42.

                Comment


                • #9
                  Arne,

                  Thank you for your response. Both of your suggestions worked. I achieved convergence when estimating the model with interactions entered as fixed parameters. I also had success when I changed the scaling of my variables. Thanks for your help!

                  Best,

                  Julia

                  Comment

                  Working...
                  X