|
|
|
|
|
|
|
|
|
|
|
|
|
|
use "/Users/eduardomontero/Dropbox/Research_ElSalvador_LandReform/R/Output/ag_census_wSegmCens_all.dta", clear |
|
|
destring Expropretario_ISTA, replace |
|
|
replace Expropretario_ISTA = agg_id if Expropretario_ISTA==. |
|
|
|
|
|
gen mean_med = age_mean- age_median |
|
|
keep age_iqr mean_med Above500 ln_agprod ln_agprod_pricew_crops CashCrop_Share StapleCrop_Share norm_dist own_amt Expropretario_ISTA reform |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
label variable ln_agprod_pricew_crops "Agricultural Revenues (ln($/ha))" |
|
|
label variable ln_agprod "Agriculural Profits (ln($/ha))" |
|
|
label variable CashCrop_Share "Share of Property for Cash Crops" |
|
|
label variable StapleCrop_Share "Share of Property for Staple Crops" |
|
|
label variable norm_dist "Distance to Reform Threshold (ha)" |
|
|
label variable own_amt "Former Owner's Cumulative Landholdings (ha)" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
local polynomial_level 1 |
|
|
local bandwidth_choice "mserd" |
|
|
local kernel_choice "tri" |
|
|
local cluster_level "Expropretario_ISTA" |
|
|
local bw 100 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
local het_var age_iqr |
|
|
|
|
|
sum `het_var', d |
|
|
local mean_agesd = `r(p50)' |
|
|
dis "`mean_agesd'" |
|
|
replace mean_med =`het_var' |
|
|
|
|
|
count if mean_med <`mean_agesd' | reform==0 |
|
|
count if mean_med >=`mean_agesd' | reform==0 |
|
|
|
|
|
gen abovemed_het = 0 |
|
|
replace abovemed_het=1 if (mean_med >=`mean_agesd' & mean_med!= .) |
|
|
|
|
|
local bw 150 |
|
|
gen dis_meas = age_iqr |
|
|
replace dis_meas=0 if dis_meas==. |
|
|
reg ln_agprod Above500 c.Above500#c.dis_meas norm_dist c.Above500#c.norm_dist if abs(norm_dist) < 150, cluster(Expropretario_ISTA) |
|
|
|
|
|
|
|
|
rdrobust ln_agprod_pricew_crops norm_dist if (mean_med >=`mean_agesd' & mean_med!= .) | reform==0, c(0) p(`polynomial_level') h(`bw' `bw') kernel(`kernel_choice') vce(cluster `cluster_level') |
|
|
|
|
|
distinct `cluster_level' if norm_dist < `e(h_l)' & norm_dist > -1*`e(h_r)' & `e(outcomevar)'!=. & `e(runningvar)'!=. |
|
|
local n_clust = `r(ndistinct)' |
|
|
su `e(outcomevar)' if norm_dist < `e(h_l)' & norm_dist > -1*`e(h_r)' |
|
|
outreg2 using "Output/Table_SegmCens_AgeHet.tex", replace se tex noobs addstat(Observations, `e(N_h_l)' + `e(N_h_r)', Clusters, `n_clust', Mean Dep. Var., `r(mean)', Bandwidth, `e(h_l)') |
|
|
|
|
|
rdrobust ln_agprod_pricew_crops norm_dist if mean_med <`mean_agesd' | reform==0, c(0) p(`polynomial_level') h(`bw' `bw') kernel(`kernel_choice') vce(cluster `cluster_level') |
|
|
|
|
|
distinct `cluster_level' if norm_dist < `e(h_l)' & norm_dist > -1*`e(h_r)' & `e(outcomevar)'!=. & `e(runningvar)'!=. |
|
|
local n_clust = `r(ndistinct)' |
|
|
su `e(outcomevar)' if norm_dist < `e(h_l)' & norm_dist > -1*`e(h_r)' |
|
|
outreg2 using "Output/Table_SegmCens_AgeHet.tex", append se tex noobs addstat(Observations, `e(N_h_l)' + `e(N_h_r)', Clusters, `n_clust', Mean Dep. Var., `r(mean)', Bandwidth, `e(h_l)') |
|
|
|
|
|
|
|
|
rdrobust ln_agprod norm_dist if (mean_med >=`mean_agesd' & mean_med!= .) | reform==0, c(0) p(`polynomial_level') h(`bw' `bw') kernel(`kernel_choice') vce(cluster `cluster_level') |
|
|
|
|
|
distinct `cluster_level' if norm_dist < `e(h_l)' & norm_dist > -1*`e(h_r)' & `e(outcomevar)'!=. & `e(runningvar)'!=. |
|
|
local n_clust = `r(ndistinct)' |
|
|
su `e(outcomevar)' if norm_dist < `e(h_l)' & norm_dist > -1*`e(h_r)' |
|
|
outreg2 using "Output/Table_SegmCens_AgeHet.tex", append se tex noobs addstat(Observations, `e(N_h_l)' + `e(N_h_r)', Clusters, `n_clust', Mean Dep. Var., `r(mean)', Bandwidth, `e(h_l)') |
|
|
|
|
|
rdrobust ln_agprod norm_dist if mean_med <`mean_agesd' | reform==0 , c(0) p(`polynomial_level') h(`bw' `bw') kernel(`kernel_choice') vce(cluster `cluster_level') |
|
|
|
|
|
distinct `cluster_level' if norm_dist < `e(h_l)' & norm_dist > -1*`e(h_r)' & `e(outcomevar)'!=. & `e(runningvar)'!=. |
|
|
local n_clust = `r(ndistinct)' |
|
|
su `e(outcomevar)' if norm_dist < `e(h_l)' & norm_dist > -1*`e(h_r)' |
|
|
outreg2 using "Output/Table_SegmCens_AgeHet.tex", append se tex noobs addstat(Observations, `e(N_h_l)' + `e(N_h_r)', Clusters, `n_clust', Mean Dep. Var., `r(mean)', Bandwidth, `e(h_l)') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
local z = (-.430 - (-0.192))/sqrt(0.326^2 + 0.376^2) |
|
|
dis 2*(1-normal(abs(`z'))) |
|
|
|
|
|
local z = (-.696 - (-0.255))/sqrt(0.411^2 + 0.504^2) |
|
|
dis 2*(1-normal(abs(`z'))) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
local bw 300 |
|
|
rdrobust CashCrop_Share norm_dist if mean_med >=`mean_agesd' | reform==0, c(0) p(`polynomial_level') h(`bw' `bw') kernel(`kernel_choice') vce(cluster `cluster_level') |
|
|
|
|
|
distinct `cluster_level' if norm_dist < `e(h_l)' & norm_dist > -1*`e(h_r)' & `e(outcomevar)'!=. & `e(runningvar)'!=. |
|
|
local n_clust = `r(ndistinct)' |
|
|
su `e(outcomevar)' if norm_dist < `e(h_l)' & norm_dist > -1*`e(h_r)' |
|
|
outreg2 using "Output/Table_SegmCens_AgeHet2.tex", replace se tex noobs addstat(Observations, `e(N_h_l)' + `e(N_h_r)', Clusters, `n_clust', Mean Dep. Var., `r(mean)', Bandwidth, `e(h_l)') |
|
|
|
|
|
rdrobust CashCrop_Share norm_dist if mean_med <`mean_agesd' | reform==0 , c(0) p(`polynomial_level') h(`bw' `bw') kernel(`kernel_choice') vce(cluster `cluster_level') |
|
|
|
|
|
distinct `cluster_level' if norm_dist < `e(h_l)' & norm_dist > -1*`e(h_r)' & `e(outcomevar)'!=. & `e(runningvar)'!=. |
|
|
local n_clust = `r(ndistinct)' |
|
|
su `e(outcomevar)' if norm_dist < `e(h_l)' & norm_dist > -1*`e(h_r)' |
|
|
outreg2 using "Output/Table_SegmCens_AgeHet2.tex", append se tex noobs addstat(Observations, `e(N_h_l)' + `e(N_h_r)', Clusters, `n_clust', Mean Dep. Var., `r(mean)', Bandwidth, `e(h_l)') |
|
|
|
|
|
|
|
|
rdrobust StapleCrop_Share norm_dist if mean_med >=`mean_agesd' | reform==0, c(0) p(`polynomial_level') h(`bw' `bw') kernel(`kernel_choice') vce(cluster `cluster_level') |
|
|
|
|
|
distinct `cluster_level' if norm_dist < `e(h_l)' & norm_dist > -1*`e(h_r)' & `e(outcomevar)'!=. & `e(runningvar)'!=. |
|
|
local n_clust = `r(ndistinct)' |
|
|
su `e(outcomevar)' if norm_dist < `e(h_l)' & norm_dist > -1*`e(h_r)' |
|
|
outreg2 using "Output/Table_SegmCens_AgeHet2.tex", append se tex noobs addstat(Observations, `e(N_h_l)' + `e(N_h_r)', Clusters, `n_clust', Mean Dep. Var., `r(mean)', Bandwidth, `e(h_l)') |
|
|
|
|
|
rdrobust StapleCrop_Share norm_dist if mean_med <`mean_agesd' | reform==0 , c(0) p(`polynomial_level') h(`bw' `bw') kernel(`kernel_choice') vce(cluster `cluster_level') |
|
|
|
|
|
distinct `cluster_level' if norm_dist < `e(h_l)' & norm_dist > -1*`e(h_r)' & `e(outcomevar)'!=. & `e(runningvar)'!=. |
|
|
local n_clust = `r(ndistinct)' |
|
|
su `e(outcomevar)' if norm_dist < `e(h_l)' & norm_dist > -1*`e(h_r)' |
|
|
outreg2 using "Output/Table_SegmCens_AgeHet2.tex", append se tex noobs addstat(Observations, `e(N_h_l)' + `e(N_h_r)', Clusters, `n_clust', Mean Dep. Var., `r(mean)', Bandwidth, `e(h_l)') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
local z = (-0.493 - (-0.571))/sqrt(0.139^2 + 0.132^2) |
|
|
dis 2*(1-normal(abs(`z'))) |
|
|
|
|
|
local z = (0.150 - (0.344))/sqrt(0.168^2 + 0.190^2) |
|
|
dis 2*(1-normal(abs(`z'))) |
|
|
|
|
|
|