Announcement

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

  • DID design

    Hi all,

    I am conducting a difference-in-difference study using four ways (2006, 2008, 2012, and 2014) of a repeated cross-sectional survey. In this study, I am estimating possible effects of a co-payment policy on older people's medical costs. The policy, which took effect in 2010, stipulates that those aged 80 and older or policy beneficiaries are entitled 100% free healthcare services so I have two possible treatment groups here. However, there also is another policy, which took place in 2003, stipulating that the poor is entitled 100% free healthcare services. I have several followings questions that need your suggestions.

    1) Although the two treatment groups are different, their healthcare benefit are the same (100%) so does it make sense combine the two into one group?
    2) I am using two-part model -twopm-, an user-written command by Belotti, Deb, Manning, and Norton to estimate outpatient costs. Before that, I want to test a parallel assumption trend using the codes below but I got an error message "no such variables"
    where b_age is those aged 80 and older - treament group 1
    policy stands for policy beneficiaries - treament group 2
    year consists of 4 survey years
    female (1=female; 0=male)
    schoolyears means education in years
    cost_op denotes out-patient costs
    poorhh: poor household
    Code:
    * For those aged 80+
    gen time=(year>2008)
    gen age_did=b_age*time
    
    reg cost_op i.b_age i.time i.age_did c.age c.schoolyears i.female if year<2012
         testparm  i.age_did
    3) How to make a graph of the parallel assumption trend?
    4) Marginal effects of the treated groups, are my codes below correct?
    Code:
    * Those aged 80+
    twopm cost_op i.b_age i.time i.age_did c.age c.schoolyears i.female, f(logit) s(glm, family(gamma) link(log))
         margins if age_did==1, dydx(age_did)
    5) Do I need to care for the possible effect of the 2003 policy? Or I just need to make sure that those who are entitled the 2010 policy are not the poor? Or Should I do a triple DID, accounting for the possible effect of the 2003 policy as well? In cases, if I want to do a triple DID so should the codes for a triple look like this?
    Code:
    gen triple=age_did*poorhh
    twopm cost_op i.b_age i.time i.poorhh i.age_did i.b_age#i.poorhh i.time#i.poorhh i.triple c.age c.schoolyears i.female, f(logit) s(glm, family(gamma) link(log))
         margins if triple==1, dydx(triple)
    Data
    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input float year int age float(b_age policy poorhh) byte female float schoolyears double cost_op
    2014 61 0 0 0 1 12   400
    2014 61 0 0 0 0 12   600
    2014 60 0 0 0 0  9   150
    2014 66 0 0 0 1 12     .
    2014 78 0 0 0 1 12   540
    2014 77 0 0 0 0  9    50
    2014 73 0 0 0 1  9     .
    2014 63 0 0 0 1 12  6550
    2014 71 0 0 0 0 12     0
    2014 66 0 0 0 0  9     .
    2014 72 0 0 0 0 12   350
    2014 93 1 0 0 0 12     0
    2014 62 0 0 0 0 12  1000
    2014 75 0 0 0 1 12  2500
    2014 67 0 0 0 1  3   300
    2014 77 0 0 0 1  5     .
    2014 74 0 0 0 1 12 24000
    2014 60 0 0 0 1 12   700
    2014 65 0 0 0 1 12    10
    2014 62 0 0 0 0 12     .
    2014 62 0 0 0 1 12     0
    2014 60 0 0 0 0  9     .
    2014 75 0 0 0 0 12  1000
    2014 65 0 1 0 0 12   600
    2014 61 0 1 0 1  7  6000
    2012 76 0 0 0 1  9     .
    2012 72 0 0 0 0 12   600
    2012 62 0 0 0 1 12     .
    2012 66 0 0 0 1  9   750
    2012 64 0 0 0 0 12     .
    2012 72 0 0 0 0 12   600
    2012 64 0 0 0 0 12     0
    2012 60 0 0 0 1 12     .
    2012 63 0 0 0 1 12     .
    2012 73 0 0 0 1 12     .
    2012 66 0 0 0 0 12     .
    2012 74 0 0 0 0  6     .
    2012 69 0 0 0 0 12     0
    2012 66 0 0 0 0 12     .
    2012 60 0 0 0 0 12     .
    2012 76 0 0 0 1  3     .
    2012 63 0 0 0 0  9  2000
    2012 74 0 0 0 0 12     .
    2012 64 0 0 0 0  9  1300
    2012 60 0 0 0 0 10     .
    2012 63 0 0 0 0 12   400
    2012 60 0 0 0 0 12   200
    2012 68 0 0 0 1 12   500
    2012 69 0 0 0 0 12   120
    2012 77 0 0 0 0 12     0
    2008 60 0 0 0 0 12  2400
    2008 65 0 0 0 0 12     .
    2008 67 0 0 0 0 12 10150
    2008 71 0 0 0 1 12  3600
    2008 80 1 0 0 1  0   500
    2008 67 0 0 0 0 12     0
    2008 63 0 0 0 1 12   300
    2008 84 1 0 0 1 12     .
    2008 80 1 1 0 0 12   500
    2008 60 0 0 0 0 12     .
    2008 61 0 0 0 1 12     .
    2008 61 0 0 0 1 12     .
    2008 63 0 0 0 0 12     .
    2008 64 0 0 0 0  9     0
    2008 67 0 0 0 0 12     .
    2008 83 0 0 1 1  0     .
    2008 82 1 1 0 0  9  2500
    2008 67 0 1 0 0  8   600
    2008 63 0 1 0 0  9     .
    2008 74 0 0 0 1  0  2400
    2008 66 0 0 0 0  9  1500
    2008 60 0 0 0 0  9   280
    2008 63 0 0 0 1  2     .
    2008 81 1 0 0 0  7     0
    2008 60 0 1 0 0  9     .
    2006 66 0 0 0 1  5     .
    2006 66 0 0 0 0  9     .
    2006 68 0 0 0 1  5     .
    2006 64 0 0 0 0 12   300
    2006 66 0 0 0 0  9   492
    2006 63 0 0 0 1  2   570
    2006 66 0 0 0 0 12   500
    2006 79 0 0 0 1  3     .
    2006 81 1 0 0 0 12     .
    2006 66 0 0 0 0  0     .
    2006 62 0 0 1 0  2     .
    2006 69 0 0 0 1  9   560
    2006 81 1 0 0 0  9     .
    2006 69 0 0 1 0  0     .
    2006 60 0 0 1 0 12     .
    2006 67 0 0 0 0 12     .
    2006 61 0 0 0 1  2     .
    2006 60 0 0 0 1  6     .
    2006 75 0 1 0 1  4  2000
    2006 68 0 1 0 0  9     .
    2006 85 1 0 0 1  0     .
    2006 64 0 1 0 0 12   200
    2006 67 0 0 0 1 12  5000
    2006 62 0 1 0 1  9   300
    2006 94 1 1 0 1  7     .
    end
    label values b_age b_age
    label def b_age 0 "No", modify
    label def b_age 1 "yes", modify
    label values policy policy
    label def policy 0 "No", modify
    label def policy 1 "yes", modify
    label values poorhh poorhh
    label def poorhh 0 "No", modify
    label def poorhh 1 "Yes", modify
    label values female female
    label def female 0 "male", modify
    label def female 1 "female", modify
    Any suggestion is highly appreciated!

    Thank you.
    Last edited by Duong Le; 29 Apr 2020, 11:11.
Working...
X