Hi all,
I am trying to replicate the results you get from rdrobust with the below code. You can at first see how I ran rdrobust with my variable "distp_offneg" where 0 is the cutoff. I then tried creating a couple of variables: an instrment indicating when my variable is >0 (above the cutoff), an instrument times my variable disp_offneg, and then a triangular weight. I tried to run a regression with these in it, and the same covariates, hoping to replicate the results but it didn't work out. Can anyone help me figure out why?
I am trying to replicate the results you get from rdrobust with the below code. You can at first see how I ran rdrobust with my variable "distp_offneg" where 0 is the cutoff. I then tried creating a couple of variables: an instrment indicating when my variable is >0 (above the cutoff), an instrument times my variable disp_offneg, and then a triangular weight. I tried to run a regression with these in it, and the same covariates, hoping to replicate the results but it didn't work out. Can anyone help me figure out why?
Code:
foreach v of varlist welfare { rdrobust `v' distp_offneg if agech>=25 & agech<=30 & male==1, p(1) bwselect(mserd) covs(lincomeb02_1 fsize02_1 fsize_incomeb02 bweight_1 lincomeb4_1 fsize4_1 fsize_incomeb4 father_figure4 black state4) vce(cluster cluster4) outreg2 using table5_2530.xls local leftbw= e(N_h_l) local rightbw= e(N_h_r) gen normscore`v' = distp_offneg gen instrument`v' = (normscore`v'>0) gen normscore_r`v' = normscore`v'*instrument`v' gen transformed`v' = normscore`v'/(`leftbw' ) replace transformed`v' = normscore`v'/(`rightbw') if normscore`v'>0 gen inbandwidth`v' = normscore`v'>-`leftbw' & normscore`v'< `rightbw' gen triwt`v' = (1-abs(transformed`v'))*inbandwidth`v' reg `v' distp_offneg normscore_r`v' instrument`v' lincomeb02_1 fsize02_1 fsize_incomeb02 bweight_1 lincomeb4_1 fsize4_1 fsize_incomeb4 father_figure4 black state4 if age>=25 & age<=30 & male==1 [pw=triwt`v'], vce(cluster cluster4) outreg2 using table5_2530.xls, addstat("control mean", mean) }
Comment