Announcement

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

  • Error using "mixlogit" on StataSE 15: "__00000P not found"

    Hello,
    I am attempting to analyze data from a discrete choice experiment using the "mixlogit" package and I am getting the following error, " __00000P not found". I was able to estimate a conditional logit model using the same data/code and have estimated a mixed logit model in the past using very similar code. I have searched the forums and can not find an example of this.

    The data is made up of about 1100 respondents who were each presented with 8 choice sets. Each choice set contained 2 options, with varying prices and one other variable (anti) as well as an opt out option (asc). anti2 and anti3 are coded as dummy variables.

    Code:
    mixlogit y asc price if MRK_CELL1==1 & MRK_Level_LFQ1==1, rand (anti 2 anti3) group(gid) id(pid) nrep(500)

    I used set trace to identify where the error was coming from.

    ----------------------------------------------------- begin ml_count_eval ---
    - version 10
    - args f type
    - if `:length global ML_dots' {
    = if 1 {
    - $ML_dots "`f'" "`type'" = * "__00000N" "input"
    - }
    ------------------------------------------------------- end ml_count_eval ---
    - scalar `h' = 1/(2*`h')
    = scalar __00000O = 1/(2*__00000O)
    - mat `dd2' = `dd2' - `dd1'
    = mat __00000P = __00000P - __00000M
    __00000P not found
    mat `dd2' = `h' * `dd2'
    mat `v' = nullmat(`v') \ `dd2'
    local i = `i' + 1
    }
    ----------------------------------------------------------------- end ml_e1 ---
    ------------------------------------------------------------------ end ml_opt --- }


    Any help on this issue would be greatly appreciated.

    Best regards,
    Mitchell King
    University of Guelph
    Last edited by Mitchell King; 19 Jul 2019, 11:40.

  • #2
    You have a space between anti and 2 in your mixlogit command. Could that be causing the error?
    -------------------------------------------
    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
      My apologies, that was just a mistake in copying the code to the post. That space is not in my do file.

      Comment


      • #4
        You should also not have a space after rand. Someimes extraneous spaces screw up commands.

        Without a replicable example it is hard to say much. Could your if clause be totally zapping the data? Does it run without it? You might run descriptive stats on all your variables using that same sample selection.
        -------------------------------------------
        Richard Williams, Notre Dame Dept of Sociology
        Stata Version: 17.0 MP (2 processor)

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

        Comment


        • #5
          I had the same error. I realised that the variables inside my rand() call had different orders of magnitude. One was between 1 and 10. The other between 100,000 and 1000,000. When I tried to redefine the latter to divide it by 100,000 to make it from 1-10, then the command ran successfully for me. (Now I just need to adjust my interpretation of the results by 100,000).

          Comment

          Working...
          X