Announcement

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

  • Creating instruments for a categorical endogenous variable

    Hello,

    I am running instrumental variable estimations to assess the impact of early marriage on education using past share of child brides in the previous decade as an instrument. However, I want to assess the impact of each age group, eg, 10-14, 15-17,18-21, as this is likely to vary. I have already created separate dummy variables for each age group, and instruments to match but there seems to be a mechanical issue when I run my estimation. How would I go about creating separate instruments for each group? This is the command I am using.


    HTML Code:
    ivregress 2sls education_yrs (married13 married17 married21 = pastsharemean13 pastsharemean17 pastsharemean21 ) freeyears pregbeforem hus_age i.mv106 residence d121 rate  edu_diff

  • #2
    Create an age group variable and then use factor variables.

    Code:
    assert inrange(age, 10, 21)
    gen agegrp= cond(inrange(age, 10, 14), 1, cond(inrange(age, 15, 17), 2, 3))
    label define agegrp 1 "10-14 years" 2 "15-17 years" 3 "18-21 years"
    label values agegrp agegrp
    
    ivregress 2sls education_yrs (i.agegrp#c.married= i.agegrp#c.pastsharemean) ///
    freeyears pregbeforem hus_age i.mv106 residence d121 rate  edu_diff, robust
    Last edited by Andrew Musau; 29 Jul 2024, 17:38.

    Comment


    • #3
      I wonder if Mwenzie is wondering how one specifies that a particular instrument is for a particular EEV. If that's the concern, the answer is: you don't. Every exogenous variable is included in every first stage. It may be unnecessary to include some, but it is the safest bet. That's why the Stata command is set up as it is. If you use the "first" option you'll see the three first stages, and they all contain all exogenous variables. That's the way it should be. Probably you should use vce(robust), too.

      Comment


      • #4
        Thanks Andrew, I attempted this but my coefficients were all insignificant.

        Hi Professor, Yes, I wasn't sure which first stage to report given that Stata was reporting every instrument in the command. Thank you for clarifying this.

        Following this, I also tried implementing a method you had suggested in a previous thread, using the predicted probabilities from the first stage with the instrument being age difference between husband and wife.

        HTML Code:
        regress married13 age_diff_temp freeyears pregbeforem hus_age i.mv106 residence rate  edu_diff 
        predict married13hat, pr (.,married13)
        
        regress married17 age_diff_temp freeyears pregbeforem hus_age i.mv106 residence rate  edu_diff 
        predict married17hat, pr (.,married17)
        
        regress married21 age_diff_temp freeyears pregbeforem hus_age i.mv106 residence rate  edu_diff 
        predict married21hat, pr (.,married21)
        
        regress married25 age_diff_temp freeyears pregbeforem hus_age i.mv106 residence rate  edu_diff if age>=22&age<=44
        predict married25hat, pr (.,married25)
        
        regress married29 age_diff_temp freeyears pregbeforem hus_age i.mv106 residence rate  edu_diff if age>=22&age<=44
        predict married29hat, pr (.,married29)
        
        eststo: ivreg2 education_yrs (married13 married17 married21 married25 married29 = age_diff_temp married13hat married17hat married21hat married25hat married29hat ) freeyears pregbeforem hus_age i.mv106 residence rate  edu_diff [pw=mv005]   if age>=22&age<=44,
        My I tests show that the instrument is not weak. However, I noticed in the first stage results the signs in most the coefficients for those married between 18-21,22-25 and 25-29 band changes sign. Would this be an issue with my code?
        Child Bride <18 Child Bride <21 Married between 10-14 Married between 15-17 Married between 18-21 Married between 22-25 Married between 25-29
        Fraction of time exposed to Free Education Policy 0.0281 0.101** -0.0642*** 0.0662*** 0.0778*** -0.0516*** -0.189***
        (0.66) (3.03) (-26.78) (17.66) (56.81) (-10.85) (-51.03)
        Pregnant before Married -0.406*** -0.414*** -0.216*** -0.299*** 0.0586*** 0.236*** 0.213***
        (-21.72) (-20.35) (-186.45) (-128.90) (105.05) (91.29) (81.83)
        Husbands age -0.00124 -0.000225 -0.00354*** 0.000905*** -0.0000349 -0.00200*** -0.000150
        (-0.53) (-0.11) (-26.43) (5.14) (-0.46) (-8.53) (-1.03)
        Husband completed Primary -0.110** -0.0444 -0.0959*** -0.0328*** 0.0493*** 0.0689*** 0.0475***
        (-3.14) (-1.81) (-36.19) (-15.52) (36.09) (22.47) (37.15)
        Husband completed Secondary -0.273*** -0.141*** -0.194*** -0.105*** 0.116*** 0.148*** 0.0706***
        (-7.31) (-5.17) (-69.24) (-37.28) (80.25) (45.90) (43.51)
        Husband completed Higher -0.490*** -0.406*** -0.319*** -0.273*** 0.0898*** 0.295*** 0.303***
        (-10.99) (-10.19) (-101.15) (-59.98) (51.78) (53.47) (62.27)
        Rural 0.0314 0.0824*** -0.00807*** 0.0381*** 0.0275*** -0.0477*** -0.0341***
        (1.39) (4.59) (-7.56) (18.29) (40.94) (-25.30) (-27.28)
        Number of survey responses husband and wife differed on 0.0895* 0.0704* 0.0248*** 0.0424*** -0.00190 -0.0769*** -0.0236***
        (2.37) (2.37) (12.46) (15.15) (-1.61) (-22.40) (-11.67)
        Difference in education between husband and wife 0.0211*** 0.0130*** 0.0149*** 0.0102*** -0.00861*** -0.0101*** -0.00910***
        (7.29) (5.30) (88.79) (42.66) (-81.08) (-33.32) (-49.39)
        Age difference betwee husband and wife 0.0112*** 0.00473 0.0139*** 0.00309*** -0.00474*** -0.0000786 -0.00683***
        (3.76) (1.89) (65.67) (13.62) (-45.61) (-0.26) (-41.47)
        married13hat 1.377*** -0.0584*** -0.0315*** -0.206*** -0.0758***
        (178.21) (-4.68) (-12.68) (-11.01) (-7.35)
        married17hat -0.0399*** 1.337*** -0.0231*** -0.194*** -0.0713***
        (-7.07) (108.60) (-10.31) (-10.58) (-7.10)
        married21hat -0.0460*** -0.0709*** 1.440*** -0.179*** -0.0658***
        (-7.36) (-5.11) (643.62) (-9.49) (-6.57)
        married25hat -0.0456*** -0.0897*** -0.0104*** 1.194*** -0.0551***
        (-7.61) (-6.61) (-5.13) (67.00) (-6.50)
        married29hat -0.0462*** -0.105*** -0.00944*** -0.129*** 1.267***
        (-7.65) (-7.67) (-4.20) (-8.20) (76.46)
        Connstant 0.650*** 0.825*** -0.169*** -0.120*** -0.376*** -0.0924* -0.397***
        (6.68) (10.45) (-13.13) (-4.03) (-64.61) (-2.43) (-18.33)
        Number of Observations 4296 4296 4296 4296 4296 4296 4296
        Notes: Standard errors in parentheses
        *** p<0.01, ** p<0.05, * p<0.1

        Comment

        Working...
        X