Announcement

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

  • Seeking Stata command suggestion for my outcome variable

    Dear Statalists,
    Would you please suggest the right Stata command for my typical type of dependent variable? or if any transformation mechanism you may know would be helpful.
    I have a panel household survey and I have a categorized dependent variable taking a value of1 if take immediate action, 2 if the next day, 3 if after two days, 4 if between three days and a week, 5 if after a week, and 6 after more than a week.
    For now, I used a linear fixed effect regression and found the coefficient of regressor variable of interest X, which is a dummy variable, is 0.19. I interpreted it as 0.19 level delay in those with a value of X=1.
    The interpretation as a level doesn’t appear to be reader friendly, do you know of any useful transformation so I can say x percentage or percent delay or any other suggestion.
    I am available to clarify if anything is unclear.
    BW,

  • #2
    as a first thought, your DV is ordered, so ologit for estimation. (maybe poisson if you think of the DV as days, but kinda iffy in your case.)

    I suspect you'd want to estimate the most likely outcome for X = 1. The likely outcome is the one with the highest probability, which Stata will estimate.

    Comment


    • #3
      Hi George,
      Thank you so much, following your suggestion I used feologit user written command given the panel structure of my data.
      How would I interpret the coefficient on my regressor variable of interest X (Which is a dummy=1 YES, 0=NO) . Suppose the ODDS RATIO value is 1.280.

      Kind regards

      Comment


      • #4
        what does this get you?

        logitmarg, dydx(X1)

        Comment


        • #5
          Here is what I get
          Code:
           
          Marginal    effects    at the average        N. of    observations=    2730
                          N. of    panel units =    72
                                  
                  Margin   Std. err.    z    P>z    [95% conf.    interval]
                                  
              1    -.066775   .0362361    -1.84    0.065    -.1377965    .0042464
              2    .0007488   .0004063    -1.84    0.065    -.0015452    .0000476
              3    .0247592   .0134358    1.84    0.065    -.0015745    .0510929
              4    .0228187   .0123828    1.84    0.065    -.0014511    .0470884
              5    .0136723   .0074194    1.84    0.065    -.0008695    .0282141
              6    .0062736   .0034044    1.84    0.065    -.000399    .0129462

          Comment


          • #6
            read
            HTML Code:
            http://kevinstaub.com/ewExternalFiles/2020_sj.pdf
            add threshold as an option to the feologit command.
            then
            margins, at(X1 = (0 1))

            this will give you the probabilities of the outcomes at X1 = 0 or 1.

            if the sign of X1 is negative, it will push the outcomes to the smaller values (and vice versa).

            margins, dydx(X1)

            will you give the marginal effect for each outcome.

            they will vary by outcome.

            Code:
            webuse nhanes2f , clear
            sample 20
            
            feologit health age age2 sex race weight iron diabetes, group(location) threshold
            
            
            Fixed-effects ordered logistic regression
            
            N. of obs. (inc. copies) =    28386
            N. of observations       =    2066
            N. of panel units        =    62
            Wald chi2(10)            =    1381.02
            Prob > chi2              =    0.0000
            Log conditional likelihood = -11225.712  Pseudo R2                =    0.2888
            (Std. err. adjusted for 62 clusters in    location)
                
            Robust
            health  Coefficient  std. err.      z    P>z     [95% conf.    interval]
                
            age   -.0323837   .0199623    -1.62   0.105    -.0715091    .0067417
            age2   -.0000407   .0002122    -0.19   0.848    -.0004566    .0003751
            sex   -.0393662   .1097884    -0.36   0.720    -.2545475    .175815
            race   -.4247452   .1274421    -3.33   0.001    -.6745271    -.1749634
            weight   -.0020998   .0032249    -0.65   0.515    -.0084205    .004221
            iron    .0033996    .001351     2.52   0.012     .0007516    .0060476
            diabetes   -1.229833    .186509    -6.59   0.000    -1.595384    -.8642822
                
            /cut1           0  (constrained)
            /cut2    1.636488   .1077295                      1.425342    1.847634
            /cut3     3.14255   .1198344                      2.907678    3.377421
            /cut4    4.374634   .1338231                      4.112346    4.636923
            Code:
            margins, at(diabetes = (0 1))
            
            
            1._at: diabetes    = 0
            2._at: diabetes    = 1
            
                                    
                    Delta-method
                Margin    std. err.    z    P>z    [95% conf.    interval]
                                    
            _predict#_at 
            1 1    .0598358    .0309922    1.93    0.054    -.0009078    .1205794
            1 2    .172249    .0848464    2.03    0.042    .0059532    .3385448
            2 1    .1737577    .0678027    2.56    0.010    .0408669    .3066485
            2 2    .3117595    .0645393    4.83    0.000    .1852648    .4382542
            3 1    .3125592    .0338245    9.24    0.000    .2462645    .378854
            3 2    .3031065    .0494674    6.13    0.000    .2061522    .4000608
            4 1    .2413129    .0400506    6.03    0.000    .1628152    .3198106
            4 2    .1355122    .0544092    2.49    0.013    .0288722    .2421522
            5 1    .2125343    .0914881    2.32    0.020    .033221    .3918476
            5 2    .0773728    .0449419    1.72    0.085    -.0107117    .1654572
            Code:
            margins, dydx(diabetes)
            
            
                                    
                    Delta-method
                dy/dx    std. err.    z    P>z    [95% conf.    interval]
                                    
            diabetes    
            _predict    
            1    .0731261    .0371754    1.97    0.049    .0002637    .1459885
            2    .13284    .0303017    4.38    0.000    .0734498    .1922303
            3    .0634835    .0643247    0.99    0.324    -.0625907    .1895577
            4    -.0818602    .0462191    -1.77    0.077    -.172448    .0087276
            5    -.1875895    .0566985    -3.31    0.001    -.2987166    -.0764624
            You see that having diabetes increases the probability of the 2nd outcome by 0.1328 (a change to 0.31176 from 0.1737577).


            Comment


            • #7
              Thanks a lot George.As I said I used a linear fixed effect initially and the results from the ordered regression appears to be consistent. So, my intention is to use ordered logit result as a robustness check.
              If I may ask, in general what is the typical way of presenting results from ordered logit regression? the "Marginal effects" only and/or the odds ratio. Alternatively, marginal effects in the main text and odds ratio in the appendix?

              Thanks very much for your time.

              Best regards,

              Comment


              • #8
                The linear model is modeling the mean, so it will produce the same sort of thing, though less detailed. I think it'd be a stretch to do hypothesis testing in the linear model given the ordered nature of the DV. I'd avoid it and stick with ologit.

                As for ologit, look up some papers and see how researchers are describing the results. Use that as a guide, but I encourage you to present what you think is interesting in a way you think is interesting.

                Comment


                • #9
                  HTML Code:
                  https://liberalarts.tamu.edu/sociology/wp-content/uploads/sites/9/2021/07/notes_logit_ordered_20210713.pdf
                  https://www3.nd.edu/~rwilliam/stats3/Ologit01.pdf
                  https://users.stat.ufl.edu/~aa/articles/agresti_tarantola.pdf
                  https://www.ncbi.nlm.nih.gov/pmc/articles/PMC9569299/
                  go to ssrn.com and search for "ordered logit"

                  Comment


                  • #10
                    Thank you so much. I will have a look at each document.

                    Best regards,
                    TG

                    Comment

                    Working...
                    X