Announcement

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

  • #16
    With your data and your code, I cannot replicate your result. This is what I get:

    Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	12.6 KB
ID:	1711738

    Comment


    • #17
      Results are different probably because i gave you a subset of the complete data. Could you please confirm if you're using the same code? What I get from the same code is this:

      Click image for larger version

Name:	exp3.JPG
Views:	1
Size:	28.9 KB
ID:	1711740


      pasting the code below again for your reference

      reghdfe att treat if year==0, vce(robust) noabsorb
      outreg2 using table_a3, replace dec(3) adjr2 nonotes tex label

      // Reg 2
      reghdfe gender treat ebola treat_ebola if year==0, vce(robust) noabsorb
      lincomest treat + treat_ebola
      mat r= r(table)
      estadd local mystat "`= cond(r[4,1]<0.01,"`:di %5.3f `=r[1,1]''***", cond(r[4,1]<0.05,"`:di %5.3f `=r[1,1]''**", cond(r[4,1]<0.1,"`:di %5.3f `=r[1,1]''*", "`:di %5.3f `=r[1,1]''")))'"
      outreg2 using table_a3, dec(3) nonotes nocons tex append addtext(Attrition for Ebola=1, `e(mystat)') keep(treat treat_ebola) label

      Comment


      • #18
        Right, it's not the exact code as I have not installed lincomest from SSC. You will want:

        Code:
        reghdfe att treat if year==0, vce(robust) noabsorb
        outreg2 using table_a3, replace dec(3) adjr2 nonotes tex label
        
        // Reg 2
        reghdfe gender treat ebola treat_ebola if year==0, vce(robust) noabsorb
        est sto reg2
        lincomest treat + treat_ebola
        mat r= r(table)
        est restore reg2
        estadd local mystat "`= cond(r[4,1]<0.01,"`:di %5.3f `=r[1,1]''***", cond(r[4,1]<0.05,"`:di %5.3f `=r[1,1]''**", cond(r[4,1]<0.1,"`:di %5.3f `=r[1,1]''*", "`:di %5.3f `=r[1,1]''")))'"
        outreg2 using table_a3, dec(3) nonotes nocons tex append addtext(Attrition for Ebola=1, `e(mystat)') keep(treat treat_ebola) label

        Comment


        • #19
          Thanks a bunch!

          Comment

          Working...
          X