Announcement

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

  • mixlogit: "At least one group has more than one chosen alternative"

    I have a problem when using the mixlogit command
    I am able to run a clogit with the following:
    Code:
    clogit fsp td1 at1 fee2, group(id)
    It does give two notes
    - note: multiple positive outcomes within groups encountered
    - note: 97 groups (776 obs) dropped because of all positive and negative outcomes

    When I try to run the same variables for a mixed logit model with the following:
    Code:
    mixlogit fsp td1, rand(at1 fee2) group(id) id(obsid)
    This returns error r(498): At least one group has more than one chosen alternative.

    The data that is used has 8 scenarios per user id. There are a total of 197 groups (1576 observations).
    For each scenario the user has to make a choice between fsp (1), psp (2) and pup (3). Since this variable choice cannot be used as a dependent variable I first modeled the first choice fsp that is 1 is fsp is chosen and 0 otherwise.

  • #2
    Hi, Did you figure out how to solve your issue?
    Thanks.

    Comment


    • #3
      Originally posted by mano raj View Post
      Hi, Did you figure out how to solve your issue?
      Thanks.
      Hi, mano raj, I am facing the same issue. Do you have any idea to solve this?

      Comment


      • #4
        Aniket Gawai : The error message means what it says. Your choice indicator says that the decision maker has selected more than one option from a choice set identified by the -group()- variable. -mixlogit- assumes that each decision maker has selected one option from each choice set. Unless your survey allowed for several choices from the same choice set, the error message means that there is an issue with your data that must be fixed. If your survey allowed for several choices from the same choice set, then you'll have to use models other than -mixlogit-: there're choice models which can handle ties in preferences (e.g., see -rologit-).

        Let's assume that your choice indicator is -y- and group variable is -gid-. To identify problematic observations, try:
        Code:
        bysort gid: egen double check = total(y)
        tabulate check
        browse if check != 1
        This -check- variable must be equal to 1 for all cases if your data set is ready for -mixlogit- estimation. That is, the choice indicator -y- must be equal to 1 for one selected alternative and 0 for all other alternatives within a group (i.e., choice set).

        The reason why -clogit- goes through fine is because -clogit- acts both as a special case of -mixlogit- (that is, -asclogit- without inclusion of alternative-specific constants) as well as an equivalent command to -xtlogit, fe- which is a binary response model that interprets each data row as a distinct choice observation. Because of the latter role, -clogit- is more relaxed about within-group variation in your choice indicator than -mixlogit-. But don't be mistaken: Even though Stata gives you -clogit- output, that -clogit- output cannot be interpreted as a special case of -mixlogit- in this situation.
        Last edited by Hong Il Yoo; 16 Nov 2022, 03:27.

        Comment

        Working...
        X