Announcement

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

  • ordered-logit Difference in Difference

    Hi,

    I am using a data similar to Card & Krueger (1994), so allow me to use this as an example.
    treated is a dummy variable (treatment group = 1 and control group= 0) ; t is a dummy variable (baseline = 0 and follow-up= 0) ; fte_gt is an ordered multicategorical variable that is assigned the values 0, 1, 2. The higher the better.


    Code:
    . use http://fmwww.bc.edu/repec/bocode/c/CardKrueger1994.dta, clear
    . gen fte_gt = 0
    . replace fte_gt = 1 if fte >= 15 & fte <= 20
    . replace fte_gt = 2 if fte > 20
    My question is, in this case, how do I evaluate the effect of the policy (or treatment)?

    Kind regards,
    Ke Ju

  • #2
    I should know how to interpret ordered logit since irk likely be on my comps next fall, but the standard DD interpretation doesn't change. It's still the average difference in the log odds, compared to the reference group, holding constant the predictor covariates.

    I'm certain that I messed part of this up, but the story remains the same.

    Comment


    • #3
      Thanks for your reply Mr. Greathouse.

      Do you think the following code is a kind of solution

      Originally posted by Ke Ju View Post
      Dear Mr. Masterov and Mr. Kumar,

      Thank you very much for the discussion, one question I have is if my dependent variable is an ordered categorical variable, is there a good solution?
      For example, take the following code as an example:

      code:
      Code:
      . use http://fmwww.bc.edu/repec/bocode/c/CardKrueger1994.dta, clear
      . gen fte_gt = 0
      . replace fte_gt = 1 if fte >= 15 & fte <= 20
      . replace fte_gt = 2 if fte > 20
      
      . ologit fte_gt i.treated##i.t
      
      Iteration 0: log likelihood = -891.35925
      Iteration 1: log likelihood = -888.60219
      Iteration 2: log likelihood = -888.60179
      Iteration 3: log likelihood = -888.60179
      
      Ordered logistic regression Number of obs = 820
      LR chi2(3) = 5.51
      Prob > chi2 = 0.1377
      Log likelihood = -888.60179 Pseudo R2 = 0.0031
      
      ------------------------------------------------------------------------------
      fte_gt | Coef. Std. Err. z P>|z| [95% Conf. Interval]
      -------------+----------------------------------------------------------------
      treated |
      NJ | -.3304535 .229076 -1.44 0.149 -.7794343 .1185273
      1.t | -.0275562 .2911727 -0.09 0.925 -.5982442 .5431318
      |
      treated#t |
      NJ#1 | .3312446 .3249211 1.02 0.308 -.305589 .9680782
      -------------+----------------------------------------------------------------
      /cut1 | -.5515638 .2081406 -.9595118 -.1436158
      /cut2 | .6056132 .2083374 .1972795 1.013947
      ------------------------------------------------------------------------------
      
      
      . margins treated#t
      
      Adjusted predictions Number of obs = 820
      Model VCE : OIM
      
      1._predict : Pr(fte_gt==0), predict(pr outcome(0))
      2._predict : Pr(fte_gt==1), predict(pr outcome(1))
      3._predict : Pr(fte_gt==2), predict(pr outcome(2))
      
      ------------------------------------------------------------------------------------
      | Delta-method
      | Margin Std. Err. z P>|z| [95% Conf. Interval]
      -------------------+----------------------------------------------------------------
      _predict#treated#t |
      1#PA#0 | .3655017 .0482699 7.57 0.000 .2708944 .460109
      1#PA#1 | .3719156 .048834 7.62 0.000 .2762027 .4676285
      1#NJ#0 | .4449465 .0258516 17.21 0.000 .3942784 .4956147
      1#NJ#1 | .3717308 .0251531 14.78 0.000 .3224316 .4210301
      2#PA#0 | .2814378 .0158507 17.76 0.000 .250371 .3125046
      2#PA#1 | .2812922 .0158883 17.70 0.000 .2501517 .3124326
      2#NJ#0 | .2733579 .0157735 17.33 0.000 .2424425 .3042734
      2#NJ#1 | .2812977 .0158378 17.76 0.000 .2502563 .3123392
      3#PA#0 | .3530605 .0475861 7.42 0.000 .2597935 .4463275
      3#PA#1 | .3467922 .0474462 7.31 0.000 .2537993 .4397851
      3#NJ#0 | .2816955 .0221846 12.70 0.000 .2382146 .3251765
      3#NJ#1 | .3469714 .024574 14.12 0.000 .2988073 .3951356
      ------------------------------------------------------------------------------------
      
      
      . margins r.treated#r.t
      
      
      Contrasts of adjusted predictions
      Model VCE : OIM
      
      1._predict : Pr(fte_gt==0), predict(pr outcome(0))
      2._predict : Pr(fte_gt==1), predict(pr outcome(1))
      3._predict : Pr(fte_gt==2), predict(pr outcome(2))
      
      ----------------------------------------------------------
      | df chi2 P>chi2
      -----------------------+----------------------------------
      treated#t@_predict |
      (NJ vs PA) (1 vs 0) 1 | 1 1.09 0.2954
      (NJ vs PA) (1 vs 0) 2 | 1 2.72 0.0994
      (NJ vs PA) (1 vs 0) 3 | 1 0.96 0.3278
      Joint | 2 2.72 0.2573
      ----------------------------------------------------------
      
      ------------------------------------------------------------------------
      | Delta-method
      | Contrast Std. Err. [95% Conf. Interval]
      -----------------------+------------------------------------------------
      treated#t@_predict |
      (NJ vs PA) (1 vs 0) 1 | -.0796296 .0761059 -.2287944 .0695351
      (NJ vs PA) (1 vs 0) 2 | .0080854 .004907 -.0015321 .017703
      (NJ vs PA) (1 vs 0) 3 | .0715442 .0731111 -.0717509 .2148394
      ------------------------------------------------------------------------
      
      
      . gen tg = treated*t
      . ologit fte_gt i.(treated t tg) bk kfc roys
      
      Iteration 0: log likelihood = -891.35925
      Iteration 1: log likelihood = -783.15648
      Iteration 2: log likelihood = -782.16628
      Iteration 3: log likelihood = -782.16161
      Iteration 4: log likelihood = -782.1616
      
      Ordered logistic regression Number of obs = 820
      LR chi2(6) = 218.40
      Prob > chi2 = 0.0000
      Log likelihood = -782.1616 Pseudo R2 = 0.1225
      
      ------------------------------------------------------------------------------
      fte_gt | Coef. Std. Err. z P>|z| [95% Conf. Interval]
      -------------+----------------------------------------------------------------
      treated |
      NJ | -.2485957 .2416733 -1.03 0.304 -.7222667 .2250753
      1.t | -.0341401 .3056148 -0.11 0.911 -.6331341 .5648538
      1.tg | .4041914 .342902 1.18 0.239 -.2678842 1.076267
      bk | .221209 .1965724 1.13 0.260 -.1640658 .6064838
      kfc | -2.91014 .3010229 -9.67 0.000 -3.500134 -2.320146
      roys | -.2896749 .214392 -1.35 0.177 -.7098755 .1305257
      -------------+----------------------------------------------------------------
      /cut1 | -.9599848 .2655394 -1.480432 -.4395372
      /cut2 | .4281474 .2631292 -.0875763 .9438711
      ------------------------------------------------------------------------------

      Comment

      Working...
      X