Announcement

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

  • Conditional Logit

    Dear statalist,

    I am using a conditional logit model (asclogit) to model vote choice in elections. Some of my independent variables are categorical and I was just wondering whether I can look at the effects of the different categories rather than just the overall effect of the variable. For instance one of my variables is "level of political interest" and can take the values "low" "medium" and "high"- I now just get a coefficient for this variable but would prefer to have a separation between levels. I tried using the i. command which works for logit and probit models, but the asclogit model gives me an error message when I try this.

    Any advice much appreciated!

    Roos

  • #2
    You can always generate dummy variables yourself, e.g.

    Code:
    tab1 polint, gen(pint)
    Much as I hate it, maybe the xi: prefix would work. But I would rather generate the dummies myself.
    -------------------------------------------
    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
      thank you very much! the xi prefix did work - as did the dummies!
      Last edited by Roosmarijn de Geus; 17 Sep 2014, 07:38.

      Comment


      • #4
        I had one more somewhat related question actually - that perhaps someone can help with. After running the asclogit model I tried to use the asprvalue post-estimation command (as described in Long and Freese "Regression Models for Categorical Dependent Variables" and on http://www.indiana.edu/~jslsoc/spost13.htm) - in order to calculate predicted probabillities but for some reason I keep getting an error-message saying "varlist required" - maybe I am missing something very obvious?

        my command looks a bit like this:

        xi: asclogit choice compdemXdem comprepXrep compXab, case(id) casevars(i.partisan i.polinterest gender age) alt (candidates)

        ******(this gives results that seem to make sense)***********

        in order to create predicted probabilities - followed by:

        asprvalue, x(gender = 1 age = 57) rest (asmean)

        *****STATA error message:*****

        varlist required

        Comment


        • #5
          According to the help file for asprvalue, "The command presently works after clogit, rologit, or asmprobit."

          Maybe you could use one of the supported command, or maybe you could use margins instead.
          -------------------------------------------
          Richard Williams, Notre Dame Dept of Sociology
          Stata Version: 17.0 MP (2 processor)

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

          Comment


          • #6
            The broader problem here is that Stata is presently inconsistent in its implementation of related commands in this domain. For example, there is no -asrologit- command, and some commands support factor variable syntax and others do not. As a result, writing post-estimation commands that would work generally for the commands that -asprvalue- would ideally would for is presently a more daunting challenge than it might appear. However, I believe a fair bit of the functionality of -asclogit- would have under -asprvalue- is available using -estat mfx-, see the help file for asclogit postestimation.

            Comment


            • #7
              Thanks both - I much appreciate the replies! I did use the estat mfx command which works, but is a bit cumbersome (but maybe that is just me not using it efficiently) - I will try the asprvalue with either clogit or asmprobit though and see how that goes !

              Comment


              • #8
                Hello everyone...Novice to the asclogit command: one of the errors I am getting on some of my variables is variable _Iincome_3 is not constant within case? what would that error be? It happens only to some of the dummies...help appreciated! No problem on my wide format for MN..@Richard Williams @Roosmarijn de Geus ...thanks [email protected]

                Comment


                • #9
                  Solomon:
                  welcome to the list.
                  In general, it's advisable not to queue up to others' posts, especially when problems do not overlap perfectly.
                  As far as your query is concerned, I would carefully scrutiny my dataset first, just to be sure that the culprit is not something very trivial to fix (as it often happens).
                  As an aside, your chances of getting helpful replies are conditional on posting exactly what you typed and what Stata gave you back (there's an often overlooked FAQ on this topic). Thanks.
                  Kind regards,
                  Carlo
                  (Stata 18.0 SE)

                  Comment

                  Working...
                  X