Announcement

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

  • oprobit/ ologit for grouped data?

    Dear All,

    I am wondering if there exists an equivalent of blogit/ bprobit for ordered logistic regressions? I have an outcome which takes 5 possible outcomes and there is a natural ordering that I wish to take into account. I didn't find anything on this in Statalist.

    Sincerely,
    Sumedha.

  • #2
    The blogit/bprobit family of commands were discontinued as of Stata 14. Those commands can be run with an appropriate option using the -glm- command; however similar commands don't exist for grouped-data ordinal regression. The obvious way around this is would be to either use frequency-weighting (by the size of each group) or to expand your dataset from grouped observations to single unit-level observations. The below code provides an illustrative example.

    Code:
    input int(yi ni)
    1 5
    2 10
    3 15
    4 20
    end
    
    ologit yi [fw=ni]
    expand ni
    ologit yi
    Selected results below show identical model estimates.

    Code:
    . ologit yi [fw=ni]
    
    Ordered logistic regression                     Number of obs     =         50
    Log likelihood = -63.992711                     Pseudo R2         =     0.0000
    
    ------------------------------------------------------------------------------
              yi |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
           /cut1 |  -2.197225   .4714045                      -3.12116   -1.273289
           /cut2 |  -.8472979   .3086067                     -1.452156   -.2424398
           /cut3 |   .4054651   .2886751                     -.1603278     .971258
    ------------------------------------------------------------------------------
    
    . expand ni
    (46 observations created)
    
    . ologit yi
    
    Ordered logistic regression                     Number of obs     =         50
    Log likelihood = -63.992711                     Pseudo R2         =     0.0000
    
    ------------------------------------------------------------------------------
              yi |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
           /cut1 |  -2.197225   .4714045                      -3.12116   -1.273289
           /cut2 |  -.8472979   .3086067                     -1.452156   -.2424398
           /cut3 |   .4054651   .2886751                     -.1603278     .971258
    ------------------------------------------------------------------------------

    Comment


    • #3
      Thank you Prof. Guizzetti, this is very helpful. I have a follow up question, but its very long so I am going to post it in a new post. Thank you again.

      Comment


      • #4
        By the way, Prof. Guizzetti, is there a way to estimate an ordered logit with the GLM? I have 3 ordered outcomes and I want to estimate increase in one of the outcomes and decline in a second. Thank you so much for your help.

        Comment


        • #5
          Sorry, that was a dumb question. You already explained. Thank you again!

          Comment


          • #6
            You're welcome. Please just call me Leonardo, I'm not a professor.

            Comment


            • #7
              Leonardo,

              Sorry to bother you again.. but I am wondering if there is any way to account for population in each state in the ologit model you specified?
              The reason being, the population varies greatly across the 50 US states and the current model doesn't weight for that since fw is being used to list the number of observations in each 'ordered' group. Otherwise I would specify
              aweight=state_population. But, my data is observational, i.e. only individuals who *select themselves* into drug use can show up in the data. So, say, 5 individual's poisoning in a small state like New Hampshire is very different rate of poisoning than 5 people poisoning in a populous state like California. Can I incorporate that variation by population in someway?

              Will greatly appreciate your input.
              Sumedha.

              Comment


              • #8
                This is quite a bit different than your original question, and the use of ordinal models is inappropriate for the goals that you have stated. But you have already received some advice toward this end in your other thread.

                Comment

                Working...
                X