Announcement

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

  • Seqlogit

    Hi all
    Currently I am using sequential logit of Buis (2007) to understand effect of son preference on contraceptive adoption and choice. My, main predictor is son preference, which is a gender-parity (GP) categorical variable (having 15 categories) with GP(2,1) means 2 living children with 1 living son as reference category. The response variable is contraceptive adoption and choice (1=not using, 2=using natural method, 3=using modern method). There are a number of controls. have found out the odds ratios simply using command xi: seqlogit Depvar i.Indepvars, or robust. Now I want to find out transitional probabilities of contraceptive adoption and choice (transition 1, is adoption i.e. using or not-using; and transition 2 is choice between natural and modern method ) for related to Gender-parity variable i.e. main predictor variable at each transition separately by setting other controls at their means. I can not use 'ofinterest' in the equation since it always wants 'over'. I don't have any 'over' variable. so seqlogitdecomp is also not working.

    After many attempts, I just could not do it. if anybody is having syntax then pls. help me out.

  • #2
    I have two comments:
    1. The decomposition performed in seqlogitdecomp only makes sense if you are willing to treat the explanatory/predictor/x-variable as continuous.
    2. If that variable is continuous, you can compute the decomposition without the over() option in seqlogit if you specify the table option in seqlogitdecomp.
    ---------------------------------
    Maarten L. Buis
    University of Konstanz
    Department of history and sociology
    box 40
    78457 Konstanz
    Germany
    http://www.maartenbuis.nl
    ---------------------------------

    Comment


    • #3
      OK. Thanks Maarten for the comments. Does it mean that if main predictor variable is categorical (having more than 2 categories) one can not compute predicted probabilities for transition. We have to be satisfied only with odds ratio?

      Comment


      • #4
        seqlogitdecomp has a very specific purpose: decompose the marginal effect of variables on the final outcome of the process modeled by seqlogit into a weighted sum of effects of this explanatory variable on different transistions and a weight for each transition. This decomposition only works when the explanatory variable is continuous.

        However, there are many other things you can look at, and it seems that you are interested in something else. Maybe what you want to do is possible in such models, but that depends on what it is exactly that you want to do. For example you can compute predicted probabilities of either passing transitions or attaining a specific final outcome if predictors are categorical. You can also compute marginal effects or discrete differences on either of these probabilities using margins. The latter is usually more useful when dealing with categorical explanatory variables. You just cannot decompose these discrete differences as nicely as you can marginal effect, which is why I stated that the decomposition and seqlogitdecomp works only for continuous variables.

        Here are some examples:

        Code:
        use "http://fmwww.bc.edu/repec/bocode/g/gss.dta", clear
                        
        recode degree 4=3
        label define degree 0 "lt high school" ///
                            1 "high school"    ///
                            2 "junior college" ///
                            3 "college", modify
        label value degree degre
        
        seqlogit degree i.south                 ///
             c.coh##c.coh if black == 0 ,       ///
             tree(0 : 1 2 3 , 1 : 2 3 , 2 : 3 ) ///
             ofinterest(paeduc)                 ///
             levels(0=9, 1=12, 2=14, 3=16)
        
        // In the south you expect .2 pseudo-years less education
        // than in the north
        margins, dydx(south)
        
        // in the south the probability of finishing college is
        // 0.4% less than in the north, but the difference is not
        // significant
        margins, dydx(south) predict(pr outcome(3))
        
        // in the south the probability of entering university given
        // that one finished high school is 0.1% larger than in the
        // north, but the difference is not significant
        margins, dydx(south) predict(trpr transition(2) choice(1))
        
        seqlogit degree i.south                 ///
             c.coh##c.coh if black == 0 ,       ///
             tree(0 : 1 2 3 , 1 : 2 3 , 2 : 3 ) ///
             ofinterest(paeduc)                 ///
             levels(0=0, 1=0, 2=1, 3=1)
            
        // In the south the probability of entering university
        // (junior college and college) is 1% less than in the
        // north, but the difference is not siginifcant
        margins, dydx(south)
        
        // The difference between the last two is that one is conditional
        // on having passed high school and the other is not.
        ---------------------------------
        Maarten L. Buis
        University of Konstanz
        Department of history and sociology
        box 40
        78457 Konstanz
        Germany
        http://www.maartenbuis.nl
        ---------------------------------

        Comment


        • #5
          Thanks Maarten for the clue. I am attaching the equation, which will probably understand the problem I am facing. The equation is as follows:

          xi: seqlogit rbcontrause i.nbrsexcomp i.wage i.rbnewedu i.bnewpartoccu i.bnewspaper i.btv i.bnewrelig i.V190 i.V102 i.rdchild i.bdechealth i.bwant[fw=biwt], tree(1:2 3, 2:3) or robust

          In my case, rbcontrause is the response variable with 3 categories (1=not using contraception, 2=using natural method and 3=using modern method). My main predictor is nbrsexcomp, which is gender-parity composition (with 15 categories). I just want to see the marginal effect at each transition of (probability of contraceptive use at each gender-parity composition) by fixing other covariates at their means. I am writing the following syntax

          .margins, dydx(nbrsexcomp)), however, it is not working. I am getting the error msg

          "Warning: cannot perform check for estimable functions.
          'nbrsexcomp' not found in list of covariates
          r(322);
          Please help.



          Comment


          • #6
            I don't see why you get that error message, but I do see that even if you did not get that error message you would still not get what you want. Please see the examples I sent before.
            ---------------------------------
            Maarten L. Buis
            University of Konstanz
            Department of history and sociology
            box 40
            78457 Konstanz
            Germany
            http://www.maartenbuis.nl
            ---------------------------------

            Comment


            • #7
              Thanks for taking so much pain on seqlogit. I am writing the following command seeing your example:

              margins, dydx(nbrsexcomp) predict(trpr transition(1) rbcontrause(1))

              However, same error msg is coming "Warning: cannot perform check for estimable functions.
              'nbrsexcomp' not found in list of covariates"
              r(322);

              I really dont understand where is the problem!!!

              Comment


              • #8
                Neither do I and I cannot replicate that problem, so there is nothing I can do.
                ---------------------------------
                Maarten L. Buis
                University of Konstanz
                Department of history and sociology
                box 40
                78457 Konstanz
                Germany
                http://www.maartenbuis.nl
                ---------------------------------

                Comment


                • #9
                  Maarten: The following command working and provide predicted probabilities of all variables:

                  margins, dydx(*) atmeans predict (trpr transition(1) choice(1))

                  margins, dydx(*) atmeans predict (trpr transition(2) choice(1))

                  Also, providing desired results. Thanks for your inputs and suggestions.

                  Comment


                  • #10
                    Thanks, Saswata, for providing these two lines of command. They are useful.

                    I had a problem similar to yours.

                    Best wishes

                    Luis

                    Comment

                    Working...
                    X