Announcement

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

  • Standard Error showing as 0

    Hi, I have posted my code below but I am wondering--is there a reason that for a couple of outcomes (college, i.e.) my standard errors are being reported as 0? I don't think this is correct...no stars showing up....thanks!
    Code:
    local i = 25
    local j = `i' + 5
    local k = 4
    local d = 0.85
    local distb1 "distp_cutoffb`k'"
    capture erase table5.txt
    use if agech >= `i' & agech <= `j' & inrange(`distb1',-`d',`d') using sample_data, clear
    local controls_early2 "lincomeb02_1 lincomeb02_2 fsize02_1 fsize02_2 fsize_incomeb02 bweight_1 bweight_2"
    local controlsc2 "lincomeb4_1 lincomeb4_2 fsize4_1 fsize4_2 fsize_incomeb4 father_figure4 male black dyear4_* dagech_4 dstate4_*"
    
    foreach outcome in welfare unemployment foodstamps income posted employed financialstrain married_r economic_index college trade {
    foreach race in all  { 
        foreach sample in male { 
    
        probit hstart eligb`k' `controlsc2' dstate`k'_* `controls_early2' if `outcome' != . & `race'_`sample' == 1, cluster(cluster`k')
        predict phat if e(sample)
    
        local condtb "if phat != . & `race'_`sample' == 1, cluster(cluster`k' idc) a(state`k')"
    
        reghdfe `outcome' eligb`k' distp_cutoffb4 distp_cutoffb4_2 `controlsc2' `controls_early2' `condtb' 
        su `outcome' if e(sample) & `distb1' > 0 & `distb1' <= 0.25
        scalar mean = r(mean)
        scalar stdv = r(sd)
        outreg2 using table5.xls, bra se excel  nocons ctitle("`outcome'-`race'_`sample'") addstat("control mean",mean,"sd",stdv) append
        
        drop phat
        
        }
    }
    }
Working...
X