Announcement

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

  • Unexpected error "r(101)" when combining melogit with if-statement

    Dear All,

    I get an unexpected error "if not allowed, r(101);"when I combine melogit with the if statement as in:

    Code:
    webuse bangladesh
    melogit c_use urban age child* || district: if district<50
    I am using Stata 15.0, Update level 25 Sep 2017 on Windows 10 and guess it is a bug.

    Kind regards, Adriaan Hoogendoorn

  • #2
    It runs when you type

    Code:
    melogit c_use urban age child* if district<50 || district:
    This is consistent with the syntax diagram in the help file of melogit: there is a fe_equation that appears before specifying the nesting structure (the || ), and if and in are specified in the fe_equation, i.e. before the ||.
    ---------------------------------
    Maarten L. Buis
    University of Konstanz
    Department of history and sociology
    box 40
    78457 Konstanz
    Germany
    http://www.maartenbuis.nl
    ---------------------------------

    Comment


    • #3
      Thanks Maarten, for helping me out!
      I guess my confusion came from other Stata commands (mixed, meqrlogit) that allowed for the alternative ordering.
      Cheers, Adriaan
      Last edited by Adriaan Hoogendoorn; 05 Oct 2017, 03:57.

      Comment

      Working...
      X