Announcement

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

  • Can I estimate choice model if all individuals choose the same alternative!

    Any response would be appreciated. This is of critical importance!

    For instance, look at the following example:
    Obs pid mode ttime decision
    1 1 1 16.481 0
    2 1 2 16.196 1
    3 1 3 23.89 0
    4 2 1 15.123 0
    5 2 2 11.373 1
    6 2 3 14.182 0
    7 3 1 19.469 0
    8 3 2 8.822 1
    9 3 3 20.819 0
    I cant seem to estimate this model using stata aslogit or logit command.

  • #2
    Welcome to Statalist.

    The answer to the question posed in the title of your post seems to be "No", because there is no data to explain under what conditions the other alternatives would be preferred to the alternative that was chosen. If all we see are examples of mode 2 being chosen, then how can we know that the independent variables have any effect at all on the decision?

    Comment


    • #3
      William has already answered the question, but you don't pay any attention to his answer. No model will fit if there is no variation in the response; the other details make no difference to that principle. It's like saying: Five people all have the same height. How do you model the variation in their height? There is none, so there is nothing to model.

      Comment


      • #4
        the chosen route is always recorded as route number 1, for all individuals. How should I go about estimating the model using asclogit command if drivers always choose alternative "Route No.1"?
        I kind of wonder if you are coding this right. Is route #1 just so spectacular that nobody ever chooses the alternatives? It may be that everybody really does make the same choice (which might actually be an interesting finding -- here you have all these other options, but not once does anybody ever choose them) -- but I would first make sure there weren't some coding errors somewhere.
        -------------------------------------------
        Richard Williams, Notre Dame Dept of Sociology
        StataNow Version: 19.5 MP (2 processor)

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

        Comment


        • #5
          My response was based on your sample data, for which there was (apparently) a single independent variable, tttime, no case-specific variables, and the choice made was always the mode with the lowest value for ttime. You now further describe your data, but it is not clear that you have completely described it. You also have not described your problem beyond "I cant seem to estimate this model using stata aslogit or logit command." To which the only possible reply, given what you've told us, is that you misunderstood something about how to use asclogit.

          To increase the likelihood that Statalist readers will be able to assist you, please review the Statalist FAQ linked to from the top of the page, especially sections 9-12 on how to best pose your question. The more you help others understand your problem, the more likely others are to be able to help you solve your problem.

          Say exactly what you typed and exactly what Stata typed (or did) in response. N.B. exactly! If you can, reproduce the error with one of Stata's provided datasets, a small fragment of your dataset, or a simple concocted dataset that you include in your posting.
          and
          Never say just that something “doesn't work” or “didn't work”, but explain precisely in what sense you didn't get what you wanted.
          Finally, the assumption on Statalist is that every question is important to the person who posed it. Following the recommendations from the FAQ on posing your question effectively will do more to get you an answer than asserting the importance the question has to you.

          Comment


          • #6
            Let me add in response to posts #5 and #3 that I am not well versed in asclogit and, looking more closely at the documentation, I now suspect the problem is that asclogit expects the choice set to be meaningful in some sense. That is, review the sample data from the example in help asclogit, the choice being modeled is between three types of automobile, with case-specific data on sex and income and choice specific data on the dealer. In the problem in question, there is nothing consistent between the four options akin to the automobile types in the sample data.

            Bottom line is I think the asclogit methodology chosen may be inappropriate to the problem at hand, but must defer to someone more experienced in the sort of analysis suggested by the description in post #3. Who in turn will likely benefit from a fuller description of the model and of the results of attempts to fit it.
            Last edited by William Lisowski; 25 Oct 2015, 18:39.

            Comment


            • #7
              Specifically, alternatives are not labelled, which means route #1 for one individual might not be the same for another
              This seems quite peculiar to me. Why aren't the alternatives labeled, and what sense can you make out of them if they aren't? It sounds like people really are making different choices (or at least could be) but no matter what choice they make it gets coded as "1". Am I correct about that, and if not, how does the coding work?

              Incidentally your output would be far easier to read if you used code tags. See pt. 12 of the FAQ.
              -------------------------------------------
              Richard Williams, Notre Dame Dept of Sociology
              StataNow Version: 19.5 MP (2 processor)

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

              Comment


              • #8
                Again, I am not really following this, but if the coding of alternatives is arbitrary and inconsistent across cases, I wonder if you should just use clogit instead?
                -------------------------------------------
                Richard Williams, Notre Dame Dept of Sociology
                StataNow Version: 19.5 MP (2 processor)

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

                Comment


                • #9
                  Again, please use code tags, as this is extremely hard to read. I don't know how you sorted or see why that would matter; the fact that you are getting convergence warnings may be a cause for concern. But explain the sorting and your logic behind it. Also why use noconstant? I think you need to present the results in a readable fashion and explain the study design better if we are to help you. I still wonder if clogit is the way to go.
                  -------------------------------------------
                  Richard Williams, Notre Dame Dept of Sociology
                  StataNow Version: 19.5 MP (2 processor)

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

                  Comment


                  • #10
                    Perhaps the most important point here is that your objective is to estimate the parameters of a Path Size Logit model. That is a model from transportation studies that is likely unfamiliar to most of the readers of Statalist.

                    Comment


                    • #11
                      Thanks for using code tags. Other Qs remain unanswered though. In particular if the coding of the alternatives is arbitrary and inconsistent I don't think an asclogit model makes sense. Have you considered clogit? Read the help and the manual entry for it. Also I don't understand what you did with the sorting or why that would make a difference. I wouldn't have much faith in the current results.
                      -------------------------------------------
                      Richard Williams, Notre Dame Dept of Sociology
                      StataNow Version: 19.5 MP (2 processor)

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

                      Comment


                      • #12
                        Path Choice Logit (PSL) model is the same as any other choice model with the exception of an explanatory variable that is added to account for overlapping of routes.
                        Different choice models (McFadden's, Conditional Logit, etc.) make different assumptions. I agree with Richard that McFadden's (asclogit) model does not seem to be an appropriate basis for Path Choice Logit given your data. You need to review the alternatives, as he suggests, and perhaps look to the literature in your field for similar studies, particularly those using standard choice set procedures to generate unchosen alternatives.

                        Comment


                        • #13
                          Because your route identifiers (R1, R2, etc.) are chosen arbitrarily they should not be included in your model for any purpose. But since your construction of them as dummy (not latent) variables was incorrect, Stata eliminated them from the model. (For example, a dummy variable for route 2 would have been something like the following:
                          Code:
                          generate R2 = route==2
                          which would have been 1 for the observations you assigned a route number of 2 and 0 otherwise. But any effect attributed to R2 would have simply been due to your choice of numbering, and that's not meaningful.)

                          Try
                          Code:
                          clogit choice time_ cost_ ps_, group(id)
                          You cannot include income as such, I believe, because it does not vary from choice to choice. However, you might, for example, believe that the effects of time depend on income, because "time is money" as the saying goes. In that case an interaction of income and time might help. In order to use interaction terms in your model, read help factor variables for advice on using Stata's built-in capabilities, which are important if you later intend to use post-estimation commands that need to know about interactions. Something like the following might then be appropriate.
                          Code:
                          clogit choice time c.income#c.time_ cost_ ps_, group(id)
                          Perhaps Richard, whose expertise well exceeds mine, will have further advice in light of your clogit results.

                          Comment


                          • #14
                            Your computed variables don't make any sense. R2, R3, etc. are all constants, e.g. R2 = 2 for every case. So, R2 through R5 all drop out. The interaction terms also don't make sense because they are perfectly correlated with each other, e.g. R4INC is always twice as large as R2INC. Income has the same value for every case in a group so it can't explain different outcomes within the group. The variables that survive may tell you something useful. Basically it looks like routes that take longer or cost more are less likely to be chosen. I am not sure how you are supposed to interpret the path size variable but its effect is highly significant, at least after controlling for the other variables.

                            I see William L. has already said many of the same things but since I already wrote this message I will leave it and hope I am adding something to the discussion!
                            -------------------------------------------
                            Richard Williams, Notre Dame Dept of Sociology
                            StataNow Version: 19.5 MP (2 processor)

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

                            Comment


                            • #15
                              It is gratifying to see that in both cases the estimates of the effects of the interaction of income with the meaningless route numbers are effectively zero. Perhaps the interaction of income with a meaningful characteristic of the routes, such as time_ or cost_, will prove more fruitful.
                              Last edited by William Lisowski; 26 Oct 2015, 20:36.

                              Comment

                              Working...
                              X