*************************************************** **** Development Paper - Preliminary Analyses ***** **** Date Created: 08 Feb 07 ********************** **** Time Last Modified: 6 Dec 2012 10:30 am * *************************************************** **************************************************** *** PART 2 - PROPENSITY SCORE MATCHING ************* **************************************************** // NOTES ON METHODS /* We are using psmatch2 with the mahalanobis option, which matches on the covariates within the caliper (tolerance level based on the distance in terms of controls). But, we are still estimating the propensity score so that we use only the observations within the common support of the distributions of the score in the treated and control samples. We check the success of the matching with pstest, psgraph and rbounds. We do matching with replacement (not enough data to estimate match without replacement). Similar to the DiPrete and Gangl (2004), we use a 1x1 random-order, nearest neighbor caliper matching algorithm. Different than the authors, we match treatment and control cases with similar values of the covariates (not propensity scores) within the caliper. See the Abadie et al. (2001) on nnmatch to explain. We also show the sensitivity of results to different choices of caliper. As caliper gets smaller, i.e., we require observations to be more similar, the number of matched pairs goes down. Alternative options are: (1) Run the pscore command to compute the prop score followed by attnd (or psmatch2). We can thus check if the balancing property is satisfied. In our case, this does not work (even with different covariate permutations or a less parsimonius specification). So we use psmatch2 directly which estimates the prop score, and check the balancing afterwards (similar to the DiPrete and Gangl paper). With the bootstrap command, it is advisable to let the psmatch2 (or attnd) to compute the prop score because then the uncertainty in the score is reflected in the bootstrapped standard errors. This is especially important when the comsup option is specified because the region of common support changes with each bootstrap sample, and bootstrapped errors can pick up this uncertainty as well. See the help doc for attnd. Note that it is not clear if the bootstrapped errors are valid in this context (Abadie & Imbens, 2006). Butwithout bootstrapping, the standard error in the estimated att does not take into account the fact that the propensity score is estimated. (2) Use nnmatch based on Abadie et al. (2001) - it performs nearest neighbor matching on covariates. Psmatch2, mahal() option is similar - and produces similar - but not identical results. (Note the mahal variable weighting in nnmatch does not work, so the results are not exactly fully comparable.) The bootstrapped results without caliper option are almost identical to nnmatch results. Note that the variables specified in the varlist are used only for the matching - they are not used as controls in predicting the outcome. The results from matching only show the treatment effect, which means we cannot estimate interaction effects. Thus, we use separate models by wealth status. (3) The first-stage migration and remittance models include the indicator for months of water shortage but the second-stage OLS, IV or Matching models do not. The indicator only helps to explain the differential migration motivations for poor, medium-wealth and wealthy households. (We get the same results with this indicator with OLS and IV, but the matching results are slightly different.) */ clear clear matrix set mem 2000m set more off *cd "Z:\C Manuscripts\Development Paper Feb 07" *cd "C:\Documents and Settings\fgarip\My Documents\C Manuscripts\Development Paper Feb 07" cd "/Users/fgarip/Documents/Data/NR/Development 07" * Determine the data set: * (1) 22 villages, migrant-reported remittance information, id as the ind identifier * (2) 51 villages, hh-reported remittance information, nrpid as the ind identifier local i=2 use "pmigrem84.dta", clear if `i'==1 { destring hhid94, replace } sort hhid94 save "pmigrem84t.dta", replace use "IVvars_p2.dta", clear if `i'==2 { tostring hhid94, replace } sort hhid94 save "IVvars_p2t.dta", replace use "IVvars3.dta", clear if `i'==1 { destring hhid94, replace } sort hhid94 save "IVvars3t.dta", replace if `i'==1 { use "devt_data00_red_sm.dta", clear tab vill84, gen(v) global vill "v1-v21" local name = "small" } if `i'==2 { use "devt_data00_red_lg.dta", clear tab vill84, gen(v) global vill "v1-v49" local name = "large" } set logtype text * Merge IV data * ***************** sort hhid94 merge 1:1 hhid94 using pmigrem84t.dta drop if _merge==2 drop _merge // Note the individuals with missing sibling mig information do not have siblings // set their values to zero replace pmigsib84 = 0 if pmigsib84==. replace pmigsib84_45 = 0 if pmigsib84_45==. replace premsib84 = 0 if premsib84==. replace premsib84_45 = 0 if premsib84_45==. gen migsib84 = pmigsib84>0 gen migsib84_45 = pmigsib84_45>0 gen remsib84 = premsib84>0 gen remsib84_45 = premsib84_45>0 lab var migsib84 "Any first order ties who have migrated in 1984" lab var migsib84_45 "Any first order ties (older than 35 in 1984) who have migrated in 1984" lab var remsib84 "Any first order ties who have remitted in 1984" lab var migsib84 "Any first order ties (older than 35 in 1984) who have remitted in 1984" sort hhid94 merge 1:1 hhid94 using IVvars3t.dta drop if _merge==2 drop _merge gen sibremdiffhh = anydiffhh replace sibremdiffhh = 0 if anydiffhh == . // in hhs with missing info on whether anyone remitted to another // hh, assume the value is zero. lab var sibremdiffhh "Anyone in the sibling network sent remittances to hhs other than his own?" ************************** * Variable manipulations * ************************** gen agehead84a = agehead94 - 10 lab var agehead84a "84: age of hh head - back-projected from 1994" egen land94s = std(land94) egen land00s = std(land00) egen prod_app2_ds = std(prod_app2_d) egen cons_app2_ds = std(cons_app2_d) egen prod_pp94s = std(prod_pp94) egen cons_pp94s = std(cons_pp94) gen hmr = 0 replace hmr = 1 if hmr94==1 | hmr00==1 replace hmr = 2 if hmr94==2 | hmr00==2 lab var hmr "hh mig-rem strategy in 94 and 00" gen hhmig94 = (htrip94>0) gen mig = 0 replace mig = 1 if hmr==1 gen rem = 0 if hmr==1 replace rem = 1 if hmr==2 gen allmig = 0 replace allmig = 1 if hmr>0 gen mig94 = 0 replace mig94 = 1 if hmr94==1 gen allmig94 = 0 replace allmig94 = 1 if hmr94>0 gen rem94 = 0 if hmr94==1 replace rem94 = 1 if hmr94==2 gen allrem94 = 0 replace allrem94 = 1 if hmr94==2 gen mig00 = 0 replace mig00 = 1 if hmr00==1 gen allmig00 = 0 replace allmig00 = 1 if hmr00>0 gen rem00 = 0 if hmr00==1 replace rem00 = 1 if hmr00==2 gen allrem00 = 0 replace allrem00 = 1 if hmr00==2 gen allmig9400 = (allmig94==1 | allmig00==1) gen rem9400 = 0 if rem94==0 & rem00==0 replace rem9400 = 1 if rem94==1 | rem00==1 replace rem9400 = 0 if rem9400==. & (rem94==0 | rem00==0) gen allrem9400 = (allrem94==1 | allrem00==1) gen nodep_hhch = nodep_ec94 * hhch94 gen nodep_hhch84 = nodep_ec84 * hhch84 gen nodep_hhch84a = nodep_ec84a * hhch84a gen noson_prod = noson94 * prod_p84s gen nodaugh_prod = nodaugh94 * prod_p84s gen noson_prod84 = noson84 * prod_p84s gen nodaugh_prod84 = nodaugh84 * prod_p84s gen noson_prod84a = noson84a * prod_p84s gen nodaugh_prod84a = nodaugh84a * prod_p84s xtile cat = prod_pp94, nq(3) // Variables for alternative analysis gen migsample94 = 0 replace migsample94 = 1 if (allmig94==1 & allmig00==0) | (allmig94==0 & allmig00==0)| (allmig94==1 & allmig00==1) lab var migsample94 "hh has a mig in 94 only, or in both (or neither) in 94 and 00" gen remsample94 = 0 replace remsample94 = 1 if (rem94==1 & rem00==0) | (rem94==0 & rem00==0)| (rem94==1 & rem00==1) lab var remsample94 "hh has a rem in 94 only, or in both (or neither) in 94 and 00" // This more restricted sample produces the results in *_MORE_RES_MIG_*. gen migsample94_2 = 0 replace migsample94_2 = 1 if (allmig94==1 & allmig00==0) | (allmig94==0 & allmig00==0) lab var migsample94_2 "hh has a mig in 94 only" gen remsample94_2 = 0 replace remsample94_2 = 1 if (rem94==1 & rem00==0) | (rem94==0 & rem00==0) lab var remsample94_2 "hh has a rem in 94 only" if `i'==1 { save "devt_data00_red_sm0.dta", replace } if `i'==2 { save "devt_data00_red_lg0.dta", replace } /* set more off set logtype text log using "/Users/fgarip/Documents/Development Paper Feb 07/Analyses Oct 2012/log files/desc/desc.txt", replace ********************************************************************************************************* * Table. Sample Characteristics by Households' Migration-Remittance Status in 1994 and 2000 *** ********************************************************************************************************* global migv "nodep_ec94 hhch94 noson94 nodaugh94 prod_p84 cons_p84 hhmig94 prev94 shortg94" global remv "nodep_ec94 hhch94 noson94 nodaugh94 prod_p84 cons_p84 hhmig94 prev94 shortg94 nmigm94 nmigf94 heduc94mig phhr94" bys allmig9400: sum $migv, sep(50) sum $remv if allmig9400==1, sep(50) sum $remv if rem9400==1, sep(50) foreach m of global migv { //compare migrants to non-migrants display "`m'" ttest `m', by(allmig9400) } foreach r of global remv { // compare remitters to non-remitters display "`r'" ttest `r', by(rem9400) } log cl */ set more off log using "/Users/fgarip/Desktop/Development Paper Feb 07/Analyses Oct 2012/log files/firststage/mig_rem_84_RES_DEF_MIG_NEW_VARS.txt", replace ************************************************************************************************************** * Table. Logistic Regression Models Predicting Household Migration and Remittance Outcomes in 1994 and 2000 * ************************************************************************************************************** //global migv "nodep_ec84a hhch84a nodep_hhch84a noson84a nodaugh84a prod_p84 cons_p84 hhmig84a" //global remv1 "nodep_ec84a hhch84a nodep_hhch84a noson84a nodaugh84a prod_p84 cons_p84 hhmig84a" //global remv2 "nmigm94 nmigf94 heduc94mig" global migv "agehead84 nodep_ec84a hhch84a noson84a nodaugh84a hmneduc84 prod_p84s cons_p84s hhmig84a timetonr84 elec84 mills84 sch84" global remv1 "agehead84 nodep_ec84a hhch84a noson84a nodaugh84a hmneduc84 prod_p84s cons_p84s hhmig84a timetonr84 elec84 mills84 sch84" global remv2 "nmigm94 nmigf94 heduc94mig" // Migration qui logit allmig9400 $migv prev84a shortg84 if migsample94==1, or est store m1 qui logit allmig9400 $migv $vill if migsample94==1, or est store m2 esttab m1 m2, keep($migv prev84a shortg84) pr2 eform star(* 0.05 ** 0.01) se noparentheses nolines // Remittances qui logit rem9400 $remv1 prev84a shortg84 $remv2 phhr94 if remsample94==1, or est store m3 qui logit rem9400 $remv1 $remv2 $vill if remsample94==1, or est store m4 esttab m3 m4, keep($remv1 prev84a shortg84 $remv2 phhr94) pr2 eform star(* 0.05 ** 0.01) se noparentheses nolines log cl /* set more off log using "/Users/fgarip/Desktop/Development Paper Feb 07/Analyses Oct 2012/log files/firststage/mig_rem_w_int.txt", replace ************************************************************************************************************** * Table. Logistic Regression Models with Wealth Interactions Predicting Household Migration in 1994 and 2000 * ************************************************************************************************************** gen shortg_prod = shortg84 * prod_p84s global migv "nodep_ec84a hhch84a nodep_hhch84a noson84a nodaugh84a prod_p84s cons_p84s hhmig84 prev84 shortg84" global intv "prod_p84s hhmig84 prev84 noson84a nodaugh84a noson_prod84a nodaugh_prod84a shortg_prod" // Migration foreach f of global intv { qui xi: logit allmig9400 $migv i.cat*`f', or esttab, keep(prod_p84s noson84a nodaugh84a shortg84 `f' _IcatX*) pr2 eform star(+ 0.10 * 0.05 ** 0.01) se noparentheses nolines compress } // Remittances global remv "nodep_ec84a hhch84a nodep_hhch84a noson84a nodaugh84a prod_p84s cons_p84s hhmig84 prev84 nmigm94 nmigf94 heduc94mig phhr94 shortg84" global intvr "prod_p84s hhmig84 prev84 noson84a nodaugh84a noson_prod84a nodaugh_prod84a shortg_prod" foreach g of global intvr { qui xi: logit rem9400 $remv i.cat*`g', or esttab, keep(prod_p84s noson84a nodaugh84a shortg84 `g' _IcatX*) pr2 eform star(+ 0.10 * 0.05 ** 0.01) se noparentheses nolines compress } log cl */ /* set more off log using "/Users/fgarip/Documents/Development Paper Feb 07/Analyses Oct 2012/log files/firststage/mig_by_wealth.txt", replace ********************************************************************************************************************* * [APPENDIX?] Table. Logistic Regression Models Predicting Household Migration in 1994 and 2000 by Household Wealth * ********************************************************************************************************************* forvalues j=1/3 { qui gen migout = allmig9400 qui replace migout = . if cat~=`j' & migout==1 qui logit migout $migv, or est store m`j' drop migout // save each data set for the interaction analysis below preserve gen cat_t = . qui keep hhid94 allmig9400 $migv cat_t qui keep if e(sample) qui replace cat_t = `j' sort hhid94 qui save "gr_`j'.dta", replace drop cat_t restore } esttab m1 m2 m3, keep($migv) pr2 eform star(* 0.05 ** 0.01) se noparentheses nolines // Check if coefficients differ significantly across models by introducing interactions // to the full sample model - note each sample includes migrants of a particular category // and all non-migrants. We append all three samples, and check if the interaction terms // between sample dummies and each indicator are significant. // 1. Compare medium-wealth to poor preserve use "gr_1.dta", replace append using "gr_2.dta" foreach v of global migv { qui xi: logit allmig9400 $migv i.cat_t*`v', or esttab, keep(`v' _IcatX*) eform star(* 0.05 ** 0.01) se noparentheses nolines } restore // 2. Compare rich to medium-wealth preserve use "gr_2.dta", replace append using "gr_3.dta" foreach v of global migv { qui xi: logit allmig9400 $migv i.cat_t*`v', or esttab, keep(`v' _IcatX*) eform star(* 0.05 ** 0.01) se noparentheses nolines } restore log cl */ /* set more off log using "/Users/fgarip/Documents/Development Paper Feb 07/Analyses Oct 2012/log files/firststage/rem_by_wealth.txt", replace ******************************************************************************************************************* * [APPENDIX?] Table. Logistic Regression Models Predicting Household Remittance Outcomes in 1994 and 2000 by Household Wealth * ******************************************************************************************************************* forvalues j=1/3 { qui gen remout = rem9400 qui replace remout = . if cat~=`j' & remout==1 qui logit remout $remv, or est store r`j' drop remout // save each data set for the interaction analysis below preserve gen cat_tr = . qui keep hhid94 rem9400 $remv cat_tr qui keep if e(sample) qui replace cat_tr = `j' sort hhid94 qui save "gr_r`j'.dta", replace drop cat_tr restore } esttab r1 r2 r3, keep($remv) pr2 eform star(* 0.05 ** 0.01) se noparentheses nolines // Check if coefficients differ significantly across models by introducing interactions // to the full sample model - see the note for migration model above. // 1. Compare medium-wealth to poor preserve use "gr_r1.dta", replace append using "gr_r2.dta" foreach v of global remv { qui xi: logit rem9400 $remv i.cat_tr*`v', or esttab, keep(`v' _IcatX*) eform star(* 0.05 ** 0.01) se noparentheses nolines } restore // 2. Compare rich to medium-wealth preserve use "gr_r2.dta", replace append using "gr_r3.dta" foreach v of global remv { qui xi: logit rem9400 $remv i.cat_tr*`v', or esttab, keep(`v' _IcatX*) eform star(* 0.05 ** 0.01) se noparentheses nolines } restore log cl */ *************************************************************************************************************************** * Table. The Effect of Migration in 1993 and 1999 on the Change in Household Assets from 1994 to 2000, * * Estimates from Alternative Methods********************************************************************* *************************************************************************************************************************** /* ORIGINAL VARIABLES - 1994 VERSIONS - USED IN THE ORIGINAL VERSION OF THE PAPER global allmig9400vars "nodep_ec94 hhch94 noson94 nodaugh94 prod_p84s cons_p84s hhmig94" global rem9400vars "nodep_ec94 hhch94 noson94 nodaugh94 prod_p84s cons_p84s hhmig94 prev94 nmigm94 nmigf94 heduc94mig" global allmig9400varsextra "prev94" global rem9400varsextra "phhr94" global allmig9400_iv "pmigsib84_45 prev94" global rem9400_iv "premsib84_45 phhr94" */ /* ORIGINAL VARIABLES - 1984 VERSIONS global allmig9400vars "nodep_ec84a hhch84a noson84a nodaugh84a prod_p84s cons_p84s hhmig84a" global rem9400vars "nodep_ec84a hhch84a noson84a nodaugh84a prod_p84s cons_p84s hhmig84a prev84a nmigm94 nmigf94 heduc94mig" */ global allmig9400vars "agehead84 nodep_ec84a hhch84a noson84a nodaugh84a hmneduc84 prod_p84s cons_p84s hhmig84a shortg84 timetonr84 elec84 mills84 sch84" global rem9400vars "agehead84 nodep_ec84a hhch84a noson84a nodaugh84a hmneduc84 prod_p84s cons_p84s hhmig84a shortg84 timetonr84 elec84 mills84 sch84 prev84a nmigm94 nmigf94 heduc94mig" global allmig9400varsextra "prev84a" global rem9400varsextra "phhr94" global allmig9400_iv "pmigsib84_45 prev84a" global rem9400_iv "premsib84_45 phhr94" global change "prod_app2_ds" global treat "allmig9400" gen c = . gen se = . gen pv = . gen a = "" gen n = . gen f = . gen p = . gen df = . gen df_d = . gen af = "" sort hhid94 gen catn = "poor" if _n==1 replace catn = "medium" if _n==2 replace catn = "rich" if _n==3 set seed 777 // for bootstrapping // Loop for outcome variables (prod_ch, cons_ch) foreach i of global change{ // Loop for treatment variables (mig, rem) foreach k of global treat{ display "************ OUTCOME: `i' TREATMENT: `k' *****************" // Set caliper to 1 for migration and 2.5 for remittances if "`k'"== "allmig9400" { local cal = 1 keep if migsample94==1 // Keep households that have a migrant in 1994 (who might have migrants in 2000 // as well) and those that have no migrants in 1994 and 2000. This restricts the outcome - // allmig9400 - to the migration events in 1994 alone. Save the results in *_RES_DEF_MIG* log files. // RUN THE CODE SEPARATELY FOR MIGRATION AND REMITTANCE OUTCOMES. // keep if migsample94_2==1 // Keep households that have a migrant in 1994 alone and those that have no migrants in // 1994 and 2000. This is a more restricted definition that separates households that have a migrant // in 1994 alone from those who have migrants in both 1994 and 2000. Save the results in // *_MORE_RES_DEF_MIG_* log files. NOTE that remsample94_2 is NOT nested within migsample94_2. // RUN THE CODE SEPARATELY FOR MIGRATION AND REMITTANCE OUTCOMES. } if "`k'"== "rem9400" { local cal = 2.5 keep if remsample94==1 // keep if remsample94_2==1 } display "CALIPER: `cal'" // POOR // Generate an outcome variable that equals 1 for migrants (or remitters) in // a given category (poor, medium, and rich) and zero for all non-migrants. gen treat = `k' qui replace treat = . if cat~=1 & treat==1 // OLS qui reg `i' treat $`k'vars $`k'varsextra est store ols_p // Treatreg // To ensure instrument exogeneity, the sample excludes individuals whose siblings // remit to other hhs than their own. qui treatreg `i' $`k'vars if sibremdiffhh==0, treat(treat = $`k'_iv $`k'vars) twostep est store iv_p // f-test for weak instruments (only works with reg, not logit) qui reg treat $`k'_iv $`k'vars if sibremdiffhh==0 est store full qui reg treat $`k'vars if sibremdiffhh==0 est store noiv qui ftest full noiv qui replace f = r(F) if _n==1 qui replace p = r(p) if _n==1 qui replace df = r(df_num) if _n==1 qui replace df = r(df_denom) if _n==1 qui replace af = "**" if p < 0.01 & _n==1 qui replace af = "*" if (p >= 0.01 & p < 0.05) & _n==1 qui replace af = "t" if (p >= 0.05 & p < 0.10) & _n==1 qui replace af = "" if p>=0.10 & _n==1 // Psmatch qui psmatch2 treat $`k'vars $`k'varsextra, outcome(`i') common logit mahal($`k'vars $`k'varsextra) caliper(`cal') // count matched pairs sort _id qui gen _id_n1 = _id[_n1] qui egen gr_id = group(_id _id_n1) qui sum gr_id sort hhid94 qui replace n = r(max) if _n==1 qui drop _id_n1 gr_id qui bootstrap r(att), rep(100): psmatch2 treat $`k'vars $`k'varsextra, outcome(`i') common logit mahal($`k'vars $`k'varsextra) caliper(`cal') matrix b = e(b) matrix s = e(se) local p = tprob(n[1],b[1,1]/s[1,1]) //compute p-values based on t-distnwith dof based on matched pairs qui replace c = b[1,1] if _n==1 qui replace se = s[1,1] if _n==1 qui replace pv = `p' if _n==1 qui replace a = "**" if `p'< 0.01 & _n==1 qui replace a = "*" if (`p'>= 0.01 & `p' < 0.05) & _n==1 qui replace a = "t" if (`p'>= 0.05 & `p' < 0.10) & _n==1 qui replace a = "" if `p'>= 0.10 & _n==1 drop treat // MEDIUM gen treat = `k' qui replace treat = . if cat~=2 & treat==1 // OLS qui reg `i' treat $`k'vars $`k'varsextra est store ols_m // Treatreg qui treatreg `i' $`k'vars if sibremdiffhh==0, treat(treat = $`k'_iv $`k'vars) twostep est store iv_m // f-test for weak instruments (only works with reg, not logit) qui reg treat $`k'_iv $`k'vars if sibremdiffhh==0 est store full qui reg treat $`k'vars if sibremdiffhh==0 est store noiv qui ftest full noiv qui replace f = r(F) if _n==2 qui replace p = r(p) if _n==2 qui replace df = r(df_num) if _n==2 qui replace df = r(df_denom) if _n==2 qui replace af = "**" if p < 0.01 & _n==2 qui replace af = "*" if (p >= 0.01 & p < 0.05) & _n==2 qui replace af = "t" if (p >= 0.05 & p < 0.10) & _n==2 qui replace af = "" if p>=0.10 & _n==2 // Psmatch qui psmatch2 treat $`k'vars $`k'varsextra, outcome(`i') common logit mahal($`k'vars $`k'varsextra) caliper(`cal') // count matched pairs sort _id qui gen _id_n1 = _id[_n1] qui egen gr_id = group(_id _id_n1) qui sum gr_id sort hhid94 qui replace n = r(max) if _n==2 qui drop _id_n1 gr_id qui bootstrap r(att), rep(100): psmatch2 treat $`k'vars $`k'varsextra, outcome(`i') common logit mahal($`k'vars $`k'varsextra) caliper(`cal') matrix b = e(b) matrix s = e(se) local p = tprob(n[2],b[1,1]/s[1,1]) //compute p-values based on t-distnwith dof based on matched pairs qui replace c = b[1,1] if _n==2 qui replace se = s[1,1] if _n==2 qui replace pv = `p' if _n==2 qui replace a = "**" if `p'< 0.01 & _n==2 qui replace a = "*" if (`p'>= 0.01 & `p' < 0.05) & _n==2 qui replace a = "t" if (`p'>= 0.05 & `p' < 0.10) & _n==2 qui replace a = "" if `p'>= 0.10 & _n==2 drop treat // RICH gen treat = `k' qui replace treat = . if cat~=3 & treat==1 // OLS qui reg `i' treat $`k'vars $`k'varsextra est store ols_r // Treatreg qui treatreg `i' $`k'vars if sibremdiffhh==0, treat(treat = $`k'_iv $`k'vars) twostep est store iv_r // f-test for weak instruments (only works with reg, not logit) qui reg treat $`k'_iv $`k'vars if sibremdiffhh==0 est store full qui reg treat $`k'vars if sibremdiffhh==0 est store noiv qui ftest full noiv qui replace f = r(F) if _n==3 qui replace p = r(p) if _n==3 qui replace df = r(df_num) if _n==3 qui replace df = r(df_denom) if _n==3 qui replace af = "**" if p < 0.01 & _n==3 qui replace af = "*" if (p >= 0.01 & p < 0.05) & _n==3 qui replace af = "t" if (p >= 0.05 & p < 0.10) & _n==3 qui replace af = "" if p>=0.10 & _n==3 // Psmatch qui psmatch2 treat $`k'vars $`k'varsextra, outcome(`i') common logit mahal($`k'vars $`k'varsextra) caliper(`cal') // count matched pairs sort _id qui gen _id_n1 = _id[_n1] qui egen gr_id = group(_id _id_n1) qui sum gr_id sort hhid94 qui replace n = r(max) if _n==3 qui drop _id_n1 gr_id qui bootstrap r(att), rep(100): psmatch2 treat $`k'vars $`k'varsextra, outcome(`i') common logit mahal($`k'vars $`k'varsextra) caliper(`cal') matrix b = e(b) matrix s = e(se) local p = tprob(n[3],b[1,1]/s[1,1]) //compute p-values based on t-distnwith dof based on matched pairs qui replace c = b[1,1] if _n==3 qui replace se = s[1,1] if _n==3 qui replace pv = `p' if _n==3 qui replace a = "**" if `p'< 0.01 & _n==3 qui replace a = "*" if (`p'>= 0.01 & `p' < 0.05) & _n==3 qui replace a = "t" if (`p'>= 0.05 & `p' < 0.10) & _n==3 qui replace a = "" if `p'>= 0.10 & _n==3 drop treat set more off set logtype text log using "/Users/fgarip/Desktop/Development Paper Feb 07/Analyses Oct 2012/log files/ols treatreg ps/AllModels_1984A_RES_DEF_MIG_NEW_VARS_`k'_`i'.txt", replace display "************ OUTCOME: `i' TREATMENT: `k' *****************" display "********* OLS ***********" esttab ols_p ols_m ols_r, keep(treat) pr2 star(* 0.05 ** 0.01) se noparentheses nolines esttab ols_p ols_m ols_r, keep(treat) pr2 star(* 0.05 ** 0.01) p noparentheses nolines display "********** IV ***********" esttab iv_p iv_m iv_r, keep(treat) pr2 star(* 0.05 ** 0.01) se noparentheses nolines esttab iv_p iv_m iv_r, keep(treat) pr2 star(* 0.05 ** 0.01) p noparentheses nolines display "********** IV - F-test ***********" sort hhid94 list catn f p df df_d af in 1/3 display "********** PS ************" list catn c se pv a n in 1/3 display "No of migrants or remitters in each category" tab cat if allmig9400==1 tab cat if rem9400==1 log cl } } drop c se pv a n f p df df_d af *************************************************************************************************************************** * Table. The Effect of Migration in 1993 and 1999 on the Change in Household Assets from 1994 to 2000, * * Matching Estimates with Alternative Wealth Categories ************************************************ *************************************************************************************************************************** /* global allmig9400vars "nodep_ec94 hhch94 noson94 nodaugh94 prod_p84s cons_p84s hhmig94 prev94" global rem9400vars "nodep_ec94 hhch94 noson94 nodaugh94 prod_p84s cons_p84s hhmig94 prev94 nmigm94 nmigf94 heduc94mig phhr94" set seed 777 // for bootstrapping // Check the sensitivity to changes in wealth categorization xtile cat1 = prod_pp94, nq(3) xtile cat2 = prod_pp94, nq(4) replace cat2 = 2 if cat2==3 replace cat2 = 3 if cat2==4 xtile cat3 = land94, nq(3) gen landfl1 = land94>10 gen asset_sum = landfl1 + tract94 + itan94 + car94 replace asset_sum = 2 if asset_sum>2 gen cat4 = asset_sum + 1 sort hhid94 gen catname = "prod - 33-67th" if _n==1 replace catname = "prod - 25-75th" if _n==2 replace catname = "land - 33-67th" if _n==3 replace catname = "asset sum (land 10)" if _n==4 gen c_poor = . gen c_rich = . gen c_med = . gen se_poor = . gen se_rich = . gen se_med = . gen pv_poor = . gen pv_rich = . gen pv_med = . gen a_poor = "" gen a_rich = "" gen a_med = "" gen n_poor = . gen n_rich = . gen n_med = . sort hhid94 global change "prod_app2_ds cons_app2_ds" global treat "allmig9400 rem9400" if `i'==1 { local cal = 3.0 } if `i'==2 { local cal = 1 } local cal10 = `cal'*10 // LOOPS - Outcome variables (prod_ch, cons_ch) --> Treatment variables (mig, rem) // --> Wealth categories // Loop for outcome variables (prod_ch, cons_ch) foreach i of global change{ // Loop for treatment variables (mig, rem) foreach k of global treat{ // Loop for wealth categories forvalues j=1/4 { display "************ OUTCOME: `i' TREATMENT: `k' *****************" display "************ WEALTH CATEGORY `j'" " of 4 ****************" // POOR // Generate a treatment variable that equals 1 for migrants (or remitters) in // a given category (poor, medium, and rich) and zero for all non-migrants. qui gen treat = `k' qui replace treat = . if cat`j'~=1 & treat==1 qui psmatch2 treat $`k'vars, outcome(`i') common logit mahal($`k'vars) caliper(`cal') // count matched pairs sort _id qui gen _id_n1 = _id[_n1] qui egen gr_id = group(_id _id_n1) qui sum gr_id sort hhid94 qui replace n_poor = r(max) if _n==`j' qui drop _id_n1 gr_id qui bootstrap r(att), rep(100): psmatch2 treat $`k'vars, outcome(`i') common logit mahal($`k'vars) caliper(`cal') matrix b = e(b) matrix s = e(se) local p = tprob(n_poor[`j'],b[1,1]/s[1,1]) //compute p-values based on t-distnwith dof based on matched pairs qui replace c_poor = b[1,1] if _n==`j' qui replace se_poor = s[1,1] if _n==`j' qui replace pv_poor = `p' if _n==`j' qui replace a_poor = "**" if `p'< 0.01 & _n==`j' qui replace a_poor = "*" if (`p'>= 0.01 & `p' < 0.05) & _n==`j' qui replace a_poor = "t" if (`p'>= 0.05 & `p' < 0.10) & _n==`j' qui replace a_poor = "" if `p'>= 0.10 & _n==`j' drop treat // MEDIUM qui gen treat = `k' qui replace treat = . if cat`j'~=2 & treat==1 qui psmatch2 treat $`k'vars, outcome(`i') common logit mahal($`k'vars) caliper(`cal') // count matched pairs sort _id qui gen _id_n1 = _id[_n1] qui egen gr_id = group(_id _id_n1) qui sum gr_id sort hhid94 qui replace n_med = r(max) if _n==`j' qui drop _id_n1 gr_id qui bootstrap r(att), rep(100): psmatch2 treat $`k'vars, outcome(`i') common logit mahal($`k'vars) caliper(`cal') matrix b = e(b) matrix s = e(se) local p = tprob(n_med[`j'],b[1,1]/s[1,1]) //compute p-values based on t-distnwith dof based on matched pairs qui replace c_med = b[1,1] if _n==`j' qui replace se_med = s[1,1] if _n==`j' qui replace pv_med = `p' if _n==`j' qui replace a_med = "**" if `p'< 0.01 & _n==`j' qui replace a_med = "*" if (`p'>= 0.01 & `p' < 0.05) & _n==`j' qui replace a_med = "t" if (`p'>= 0.05 & `p' < 0.10) & _n==`j' qui replace a_med = "" if `p'>= 0.10 & _n==`j' drop treat // RICH gen treat = `k' replace treat = . if cat`j'~=3 & treat==1 qui psmatch2 treat $`k'vars, outcome(`i') common logit mahal($`k'vars) caliper(`cal') // count matched pairs sort _id qui gen _id_n1 = _id[_n1] qui egen gr_id = group(_id _id_n1) qui sum gr_id sort hhid94 qui replace n_rich = r(max) if _n==`j' qui drop _id_n1 gr_id qui bootstrap r(att), rep(100): psmatch2 treat $`k'vars, outcome(`i') common logit mahal($`k'vars) caliper(`cal') matrix b = e(b) matrix s = e(se) local p = tprob(n_rich[`j'],b[1,1]/s[1,1]) //compute p-values based on t-distnwith dof based on matched pairs qui replace c_rich = b[1,1] if _n==`j' qui replace se_rich = s[1,1] if _n==`j' qui replace pv_rich = `p' if _n==`j' qui replace a_rich = "**" if `p'< 0.01 & _n==`j' qui replace a_rich = "*" if (`p'>= 0.01 & `p' < 0.05) & _n==`j' qui replace a_rich = "t" if (`p'>= 0.05 & `p' < 0.10) & _n==`j' qui replace a_rich = "" if `p'>= 0.10 & _n==`j' drop treat } set more off set logtype text log using "/Users/fgarip/Documents/Development Paper Feb 07/Analyses Oct 2012/log files/ps/`k'_`i'_caliper`cal10'.txt", replace display "CALIPER: `cal'" display "************" display "************ OUTCOME: `i' TREATMENT: `k' *****************" sort hhid94 display "************ POOR ***************" list catname c_poor se_poor pv_poor a_poor n_poor in 1/6 display "************ MEDIUM ***************" list catname c_med se_med pv_med a_med n_med in 1/6 display "************ RICH ***************" list catname c_rich se_rich pv_rich a_rich n_rich in 1/6 log cl } } drop c_* se_* pv_* a_* n_* */ ******************************************************************************************************** * Table. The Effect of Migration in 1993 and 1999 on the Change in Household Assets from 1994 to 2000, * * Sensitivity of Matching Estimatesto Caliper Size ***************************************************** ******************************************************************************************************** /* global allmig9400vars "nodep_ec94 hhch94 noson94 nodaugh94 prod_p84s cons_p84s hhmig94 prev94" global rem9400vars "nodep_ec94 hhch94 noson94 nodaugh94 prod_p84s cons_p84s hhmig94 prev94 nmigm94 nmigf94 heduc94mig phhr94" set seed 777 // for bootstrapping global change "prod_app2_ds" global treat "rem9400" gen c_poor = . gen c_rich = . gen c_med = . gen se_poor = . gen se_rich = . gen se_med = . gen pv_poor = . gen pv_rich = . gen pv_med = . gen a_poor = "" gen a_rich = "" gen a_med = "" gen n_poor = . gen n_rich = . gen n_med = . gen caliper = . // Start caliper at 0.50 for migration, and at 1.50 for remittances // (few non-remitters, therefore more difficult to match) if `i'==1 { local be = 3.0 local st = 0.5 } if `i'==2 { local be = 1.50 local st = 0.25 } sort hhid94 // LOOPS - Outcome variables (prod_ch, cons_ch) --> Treatment variables (mig, rem) --> Calipers // Loop for outcome variables (prod_ch, cons_ch) foreach i of global change{ // Loop for treatment variables (mig, rem) foreach k of global treat{ forvalues l = 1(1)10 { local cal = `be' + `st' * (`l'-1) replace caliper = `cal' if _n==`l' display "************ CALIPER: `cal' *****************" // POOR // Generate a treatment variable that equals 1 for migrants (or remitters) in // a given category (poor, medium, and rich) and zero for all non-migrants. qui gen treat = `k' qui replace treat = . if cat~=1 & treat==1 qui psmatch2 treat $`k'vars, outcome(`i') common logit mahal($`k'vars) caliper(`cal') // count matched pairs sort _id qui gen _id_n1 = _id[_n1] qui egen gr_id = group(_id _id_n1) qui sum gr_id sort hhid94 qui replace n_poor = r(max) if _n==`l' qui drop _id_n1 gr_id qui bootstrap r(att), rep(100): psmatch2 treat $`k'vars, outcome(`i') common logit mahal($`k'vars) caliper(`cal') matrix b = e(b) matrix s = e(se) local p = tprob(n_poor[`l'],b[1,1]/s[1,1]) //compute p-values based on t-distnw ith dof based on matched pairs qui replace c_poor = b[1,1] if _n==`l' qui replace se_poor = s[1,1] if _n==`l' qui replace pv_poor = `p' if _n==`l' qui replace a_poor = "**" if `p'< 0.01 & _n==`l' qui replace a_poor = "*" if (`p'>= 0.01 & `p' < 0.05) & _n==`l' qui replace a_poor = "t" if (`p'>= 0.05 & `p' < 0.10) & _n==`l' qui replace a_poor = "" if `p'>= 0.10 & _n==`l' drop treat // MEDIUM qui gen treat = `k' qui replace treat = . if cat~=2 & treat==1 qui psmatch2 treat $`k'vars, outcome(`i') common logit mahal($`k'vars) caliper(`cal') // count matched pairs sort _id qui gen _id_n1 = _id[_n1] qui egen gr_id = group(_id _id_n1) qui sum gr_id sort hhid94 qui replace n_med = r(max) if _n==`l' qui drop _id_n1 gr_id qui bootstrap r(att), rep(100): psmatch2 treat $`k'vars, outcome(`i') common logit mahal($`k'vars) caliper(`cal') matrix b = e(b) matrix s = e(se) local p = tprob(n_med[`l'],b[1,1]/s[1,1]) //compute p-values based on t-distnwith dof based on matched pairs qui replace c_med = b[1,1] if _n==`l' qui replace se_med = s[1,1] if _n==`l' qui replace pv_med = `p' if _n==`l' qui replace a_med = "**" if `p'< 0.01 & _n==`l' qui replace a_med = "*" if (`p'>= 0.01 & `p' < 0.05) & _n==`l' qui replace a_med = "t" if (`p'>= 0.05 & `p' < 0.10) & _n==`l' qui replace a_med = "" if `p'>= 0.10 & _n==`l' drop treat // RICH qui gen treat = `k' qui replace treat = . if cat~=3 & treat==1 qui psmatch2 treat $`k'vars, outcome(`i') common logit mahal($`k'vars) caliper(`cal') // count matched pairs sort _id qui gen _id_n1 = _id[_n1] qui egen gr_id = group(_id _id_n1) qui sum gr_id sort hhid94 qui replace n_rich = r(max) if _n==`l' qui drop _id_n1 gr_id qui bootstrap r(att), rep(100): psmatch2 treat $`k'vars, outcome(`i') common logit mahal($`k'vars) caliper(`cal') matrix b = e(b) matrix s = e(se) local p = tprob(n_rich[`l'],b[1,1]/s[1,1]) //compute p-values based on t-distnwith dof based on matched pairs qui replace c_rich = b[1,1] if _n==`l' qui replace se_rich = s[1,1] if _n==`l' qui replace pv_rich = `p' if _n==`l' qui replace a_rich = "**" if `p'< 0.01 & _n==`l' qui replace a_rich = "*" if (`p'>= 0.01 & `p' < 0.05) & _n==`l' qui replace a_rich = "t" if (`p'>= 0.05 & `p' < 0.10) & _n==`l' qui replace a_rich = "" if `p'>= 0.10 & _n==`l' drop treat } set more off set logtype text log using "/Users/fgarip/Documents/Development Paper Feb 07/Analyses Oct 2012/log files/ps/`k'_`i'_by_caliper.txt", replace display "CALIPER: `cal'" display "************" display "************ OUTCOME: `i' TREATMENT: `k' *****************" sort hhid94 display "************ POOR ***************" list caliper c_poor se_poor pv_poor a_poor n_poor in 1/7 display "************ MEDIUM ***************" list caliper c_med se_med pv_med a_med n_med in 1/7 display "************ RICH ***************" list caliper c_rich se_rich pv_rich a_rich n_rich in 1/7 log cl } } */ ************************************************************************************************************ * Table. The Effect of Migration in 1993 and 1999 on the Change in Household Asset Rank from 1994 to 2000, * * Matching Estimates *************************************************************************************** ************************************************************************************************************ /* global allmig9400vars "nodep_ec94 hhch94 noson94 nodaugh94 prod_p84s cons_p84s hhmig94 prev94" global rem9400vars "nodep_ec94 hhch94 noson94 nodaugh94 prod_p84s cons_p84s hhmig94 prev94 nmigm94 nmigf94 heduc94mig phhr94" global change "prod_pp_d_rank cons_pp_d_rank" global treat "allmig9400 rem9400" global allmig9400_iv "pmigsib84_45 prev94" global rem9400_iv "premsib84_45 phhr94" gen c = . gen se = . gen pv = . gen a = "" gen n = . gen f = . gen p = . gen df = . gen df_d = . gen af = "" sort hhid94 gen catn = "poor" if _n==1 replace catn = "medium" if _n==2 replace catn = "rich" if _n==3 set seed 777 // for bootstrapping // Loop for outcome variables (prod_ch, cons_ch) foreach i of global change{ // Loop for treatment variables (mig, rem) foreach k of global treat{ display "************ OUTCOME: `i' TREATMENT: `k' *****************" // Set caliper to 1 for migration and 2.5 for remittances if "`k'"== "allmig9400" { local cal = 1 } if "`k'"== "rem9400" { local cal = 2.5 } display "CALIPER: `cal'" // POOR // Generate an outcome variable that equals 1 for migrants (or remitters) in // a given category (poor, medium, and rich) and zero for all non-migrants. gen treat = `k' qui replace treat = . if cat~=1 & treat==1 // Psmatch qui psmatch2 treat $`k'vars, outcome(`i') common logit mahal($`k'vars) caliper(`cal') // count matched pairs sort _id qui gen _id_n1 = _id[_n1] qui egen gr_id = group(_id _id_n1) qui sum gr_id sort hhid94 qui replace n = r(max) if _n==1 qui drop _id_n1 gr_id qui bootstrap r(att), rep(100): psmatch2 treat $`k'vars, outcome(`i') common logit mahal($`k'vars) caliper(`cal') matrix b = e(b) matrix s = e(se) local p = tprob(n[1],b[1,1]/s[1,1]) //compute p-values based on t-distnwith dof based on matched pairs qui replace c = b[1,1] if _n==1 qui replace se = s[1,1] if _n==1 qui replace pv = `p' if _n==1 qui replace a = "**" if `p'< 0.01 & _n==1 qui replace a = "*" if (`p'>= 0.01 & `p' < 0.05) & _n==1 qui replace a = "t" if (`p'>= 0.05 & `p' < 0.10) & _n==1 qui replace a = "" if `p'>= 0.10 & _n==1 drop treat // MEDIUM gen treat = `k' qui replace treat = . if cat~=2 & treat==1 // Psmatch qui psmatch2 treat $`k'vars, outcome(`i') common logit mahal($`k'vars) caliper(`cal') // count matched pairs sort _id qui gen _id_n1 = _id[_n1] qui egen gr_id = group(_id _id_n1) qui sum gr_id sort hhid94 qui replace n = r(max) if _n==2 qui drop _id_n1 gr_id qui bootstrap r(att), rep(100): psmatch2 treat $`k'vars, outcome(`i') common logit mahal($`k'vars) caliper(`cal') matrix b = e(b) matrix s = e(se) local p = tprob(n[2],b[1,1]/s[1,1]) //compute p-values based on t-distnwith dof based on matched pairs qui replace c = b[1,1] if _n==2 qui replace se = s[1,1] if _n==2 qui replace pv = `p' if _n==2 qui replace a = "**" if `p'< 0.01 & _n==2 qui replace a = "*" if (`p'>= 0.01 & `p' < 0.05) & _n==2 qui replace a = "t" if (`p'>= 0.05 & `p' < 0.10) & _n==2 qui replace a = "" if `p'>= 0.10 & _n==2 drop treat // RICH gen treat = `k' qui replace treat = . if cat~=3 & treat==1 // Psmatch qui psmatch2 treat $`k'vars, outcome(`i') common logit mahal($`k'vars) caliper(`cal') // count matched pairs sort _id qui gen _id_n1 = _id[_n1] qui egen gr_id = group(_id _id_n1) qui sum gr_id sort hhid94 qui replace n = r(max) if _n==3 qui drop _id_n1 gr_id qui bootstrap r(att), rep(100): psmatch2 treat $`k'vars, outcome(`i') common logit mahal($`k'vars) caliper(`cal') matrix b = e(b) matrix s = e(se) local p = tprob(n[3],b[1,1]/s[1,1]) //compute p-values based on t-distnwith dof based on matched pairs qui replace c = b[1,1] if _n==3 qui replace se = s[1,1] if _n==3 qui replace pv = `p' if _n==3 qui replace a = "**" if `p'< 0.01 & _n==3 qui replace a = "*" if (`p'>= 0.01 & `p' < 0.05) & _n==3 qui replace a = "t" if (`p'>= 0.05 & `p' < 0.10) & _n==3 qui replace a = "" if `p'>= 0.10 & _n==3 drop treat set more off set logtype text log using "/Users/fgarip/Documents/Development Paper Feb 07/Analyses Oct 2012/log files/ps/PS_`k'_`i'.txt", replace display "************ OUTCOME: `i' TREATMENT: `k' *****************" display "********** PS ************" list catn c se pv a n in 1/3 display "No of migrants or remitters in each category" tab cat if allmig9400==1 tab cat if rem9400==1 log cl } } drop c se pv a n f p df df_d af */ /* ************************************************************************************************************ * Table. The Effect of Migration in 1993 and 1999 on the Change in Household Asset Rank from 1994 to 2000, * * OLS estimates ******************************************************************************************** ************************************************************************************************************ global allmig9400vars "nodep_ec94 hhch94 noson94 nodaugh94 prod_p84s cons_p84s hhmig94" global rem9400vars "nodep_ec94 hhch94 noson94 nodaugh94 prod_p84s cons_p84s hhmig94 prev94 nmigm94 nmigf94 heduc94mig" global allmig9400varsextra "prev94" global rem9400varsextra "phhr94" global change "prod_pp_d_rank cons_pp_d_rank" global treat "allmig9400 rem9400" sort hhid94 gen catn = "poor" if _n==1 replace catn = "medium" if _n==2 replace catn = "rich" if _n==3 set seed 777 // for bootstrapping // Loop for outcome variables (prod_ch, cons_ch) foreach i of global change{ // Loop for treatment variables (mig, rem) foreach k of global treat{ display "************ OUTCOME: `i' TREATMENT: `k' *****************" // POOR // Generate an outcome variable that equals 1 for migrants (or remitters) in // a given category (poor, medium, and rich) and zero for all non-migrants. gen treat = `k' qui replace treat = . if cat~=1 & treat==1 // OLS qui reg `i' treat $`k'vars $`k'varsextra est store ols_p drop treat // MEDIUM gen treat = `k' qui replace treat = . if cat~=2 & treat==1 // OLS qui reg `i' treat $`k'vars $`k'varsextra est store ols_m drop treat // RICH gen treat = `k' qui replace treat = . if cat~=3 & treat==1 // OLS qui reg `i' treat $`k'vars $`k'varsextra est store ols_r drop treat set more off set logtype text log using "/Users/fgarip/Documents/Development Paper Feb 07/Analyses Oct 2012/log files/ols treatreg ps/OLS_`k'_`i'.txt", replace display "************ OUTCOME: `i' TREATMENT: `k' *****************" display "********* OLS ***********" esttab ols_p ols_m ols_r, keep(treat) pr2 star(* 0.05 ** 0.01) se noparentheses nolines esttab ols_p ols_m ols_r, keep(treat) pr2 star(* 0.05 ** 0.01) p noparentheses nolines log cl } } */ ***************************************************************** * [APPENDIX] Table. Covariate Balance Before and After Matching * ***************************************************************** /* set more off set logtype text log using "/Users/fgarip/Documents/Development Paper Feb 07/Analyses Oct 2012/log files/ps/ps_cov_bal.txt", replace global allmig9400vars "nodep_ec94 hhch94 noson94 nodaugh94 prod_p84s cons_p84s hhmig94 prev94 shortg94" global rem9400vars "nodep_ec94 hhch94 noson94 nodaugh94 prod_p84s cons_p84s hhmig94 prev94 shortg94 nmigm94 nmigf94 heduc94mig phhr94" // Migration // Poor gen treat = allmig9400 qui replace treat = . if cat~=1 & treat==1 qui psmatch2 treat $allmig9400vars, outcome(prod_app2_ds) common logit mahal($allmig9400vars) caliper(1) pstest _pscore $allmig9400vars, treated(_treat) support(_support) // assessing covariate imbalance and bias reduction drop treat // Medium-wealth gen treat = allmig9400 qui replace treat = . if cat~=2 & treat==1 qui psmatch2 treat $allmig9400vars, outcome(prod_app2_ds) common logit mahal($allmig9400vars) caliper(1) pstest _pscore, treated(_treat) support(_support) drop treat // Rich gen treat = allmig9400 qui replace treat = . if cat~=3 & treat==1 qui psmatch2 treat $allmig9400vars, outcome(prod_app2_ds) common logit mahal($allmig9400vars) caliper(1) pstest _pscore, treated(_treat) support(_support) drop treat // Remittances // Poor gen treat = rem9400 qui replace treat = . if cat~=1 & treat==1 qui psmatch2 treat $rem9400vars, outcome(prod_app2_ds) common logit mahal($rem9400vars) caliper(2.5) pstest _pscore, treated(_treat) support(_support) drop treat // Medium-wealth gen treat = rem9400 qui replace treat = . if cat~=2 & treat==1 qui psmatch2 treat $rem9400vars, outcome(prod_app2_ds) common logit mahal($rem9400vars) caliper(2.5) pstest _pscore, treated(_treat) support(_support) drop treat // Rich gen treat = rem9400 qui replace treat = . if cat~=3 & treat==1 qui psmatch2 treat $rem9400vars, outcome(prod_app2_ds) common logit mahal($rem9400vars) caliper(2.5) pstest _pscore, treated(_treat) support(_support) drop treat log cl */ ******************************************************** * [DATA FOR THE TEXT] Checks for instrument exogeneity * ******************************************************** /* set more off set logtype text log using "/Users/fgarip/Desktop/Development Paper Feb 07/Analyses Oct 2012/log files/tests/iv_exogenetiy.txt", replace */ /* global allmig9400vars "nodep_ec94 hhch94 noson94 nodaugh94 prod_p84s cons_p84s hhmig94" global rem9400vars "nodep_ec94 hhch94 noson94 nodaugh94 prod_p84s cons_p84s hhmig94 prev94 nmigm94 nmigf94 heduc94mig" global allmig9400varsextra "prev94" global rem9400varsextra "phhr94" global allmig9400_iv "pmigsib84_45 prev94" global rem9400_iv "premsib84_45 phhr94" */ /* global allmig9400vars "nodep_ec84a hhch84a noson84a nodaugh84a hsize84 hmneduc84 prod_p84s cons_p84s hhmig84a timetonr84 elec84 mills84 sch84" global rem9400vars "nodep_ec84a hhch84a noson84a nodaugh84a hsize84 hmneduc84 prod_p84s cons_p84s hhmig84a timetonr84 elec84 mills84 sch84 prev84a nmigm94 nmigf94 heduc94mig" global allmig9400varsextra "prev84a" global rem9400varsextra "phhr94" global allmig9400_iv "pmigsib84_45 prev84a" global rem9400_iv "premsib84_45 phhr94" // Evidence for instrument exogeneity // //////////////////////////////////////// // Check if IV vars are significant in predicting no of hh members involved in local economic // activities, which are presumably related to wealth gain as well. corr prod_app2_ds mheco94 reg mheco94 $allmig9400vars $allmig9400_iv if migsample94==1 & sibremdiffhh==0 reg mheco94 $allmig9400vars $allmig9400_iv if cat==1 & migsample94==1 & sibremdiffhh==0 reg mheco94 $allmig9400vars $allmig9400_iv if cat==2 & migsample94==1 & sibremdiffhh==0 reg mheco94 $allmig9400vars $allmig9400_iv if cat==3 & migsample94==1 & sibremdiffhh==0 reg mheco94 $rem9400vars $rem9400_iv if remsample94==1 & sibremdiffhh==0 reg mheco94 $rem9400vars $rem9400_iv if cat==1 & remsample94==1 & sibremdiffhh==0 reg mheco94 $rem9400vars $rem9400_iv if cat==2 & remsample94==1 & sibremdiffhh==0 reg mheco94 $rem9400vars $rem9400_iv if cat==3 & remsample94==1 & sibremdiffhh==0 log cl */ /* log using "/Users/fgarip/Documents/Development Paper Feb 07/Analyses Oct 2012/log files/tests/endogenetiy.txt", replace // Check for endogeneity of wealth and migration // ////////////////////////////////////////////////// qui reg prod_p84s shortg84 predict prod_res if e(sample), resid qui reg cons_p84s shortg84 $vill predict cons_res if e(sample), resid qui reg allmig9400 $allmig9400vars $allmig9400varsextra prod_res cons_res est store l1 qui reg allmig9400 $allmig9400vars $allmig9400varsextra est store l2 ftest l1 l2 qui reg rem9400 $rem9400vars $rem9400varsextra prod_res cons_res est store l3 qui reg rem9400 $rem9400vars $rem9400varsextra est store l4 ftest l3 l4 log cl */ ***************************************************************************************** * Table R2. The effect of total amount of remittances in 1993 and 1999 on the change in * * household from 1994 to 2000, OLS estimates ******************************************* ***************************************************************************************** /* global rem9400vars "nodep_ec94 hhch94 noson94 nodaugh94 prod_p84s cons_p84s hhmig94 prev94 nmigm94 nmigf94 heduc94mig" global rem9400varsextra "phhr94" global rem9400_iv "premsib84_45 phhr94" // Use remittance amount instead of remittance probability // //////////////////////////////////////////////////////////// gen logrem9400 = 0 if rem9400~=. replace logrem9400 = ln(rem_amt_total) if rem_amt_total>0 lab var logrem9400 "log of total rem amount (baht) in 94 and 00" gen treat = logrem9400 qui replace treat = . if cat~=1 & rem9400==1 qui reg prod_app2_ds treat $rem9400vars $rem9400varsextra est store p1 qui ivregress 2sls prod_app2_ds $rem9400vars (treat = $rem9400_iv) est store piv1 qui reg cons_app2_ds treat $rem9400vars $rem9400varsextra est store c1 qui ivregress 2sls cons_app2_ds $rem9400vars (treat = $rem9400_iv) est store civ1 drop treat gen treat = logrem9400 qui replace treat = . if cat~=2 & rem9400==1 qui reg prod_app2_ds treat $rem9400vars $rem9400varsextra est store p2 qui ivregress 2sls prod_app2_ds $rem9400vars (treat = $rem9400_iv) est store piv2 qui reg cons_app2_ds treat $rem9400vars $rem9400varsextra est store c2 qui ivregress 2sls cons_app2_ds $rem9400vars (treat = $rem9400_iv) est store civ2 drop treat gen treat = logrem9400 qui replace treat = . if cat~=3 & rem9400==1 qui reg prod_app2_ds treat $rem9400vars $rem9400varsextra est store p3 qui ivregress 2sls prod_app2_ds $rem9400vars (treat = $rem9400_iv) est store piv3 qui reg cons_app2_ds treat $rem9400vars $rem9400varsextra est store c3 qui ivregress 2sls cons_app2_ds $rem9400vars (treat = $rem9400_iv) est store civ3 drop treat set more off set logtype text log using "/Users/fgarip/Documents/Development Paper Feb 07/Analyses Oct 2012/log files/ols treatreg ps/OLS_remamount_tableR2.txt", replace // OLS esttab p1 p2 p3, keep(treat) pr2 star(* 0.05 ** 0.01) se noparentheses nolines esttab c1 c2 c3, keep(treat) pr2 star(* 0.05 ** 0.01) se noparentheses nolines //IV esttab piv1 piv2 piv3, keep(treat) pr2 star(* 0.05 ** 0.01) se noparentheses nolines esttab civ1 civ2 civ3, keep(treat) pr2 star(* 0.05 ** 0.01) se noparentheses nolines log cl */ ************************************************************************************ * Table R3. The effect of migration and remittances in 1993 or 1999 on the change ** * in household assets from 1994 to 2000, estimates from alternative specifications * ************************************************************************************ /* global allmig9400vars "nodep_ec94 hhch94 noson94 nodaugh94 prod_p84s cons_p84s hhmig94 prev94" global rem9400vars "nodep_ec94 hhch94 noson94 nodaugh94 prod_p84s cons_p84s hhmig94 prev94 nmigm94 nmigf94 heduc94mig phhr94" // Introducing alternative indicators of mig/rem status: having (1) a migrant in 1993 or 1999, // // and (2) a remitter in 1993 or 1999. The additional models in Table R3 include binary //////// // indicators for having (3) a migrant and a remitter in 1993 or 1999, ////////////////////////// // (4) a migrant in 1993 and a migrant in 1999, (5) a remitter in 1993 and a remitter in 1999. // ///////////////////////////////////////////////////////////////////////////////////////////////// // Poor gen treat = allmig9400 qui replace treat = . if cat~=1 & treat==1 qui reg prod_app2_ds allmig9400 $allmig9400vars if treat~=. est store mp1_1 qui reg prod_app2_ds allmig9400 allrem9400 $allmig9400vars if treat~=. est store mp3_1 qui reg prod_app2_ds allmig94 allmig00 $allmig9400vars if treat~=. est store mp4_1 qui reg cons_app2_ds allmig9400 $allmig9400vars if treat~=. est store mc1_1 qui reg cons_app2_ds allmig9400 allrem9400 $allmig9400vars if treat~=. est store mc3_1 qui reg cons_app2_ds allmig94 allmig00 $allmig9400vars if treat~=. est store mc4_1 drop treat gen treat = rem9400 qui replace treat = . if cat~=1 & treat==1 qui reg prod_app2_ds rem9400 $allrem9400vars if treat~=. est store mp2_1 qui reg prod_app2_ds allrem94 allrem00 $allrem9400vars if treat~=. est store mp5_1 qui reg cons_app2_ds rem9400 $allrem9400vars if treat~=. est store mc2_1 qui reg cons_app2_ds allrem94 allrem00 $allrem9400vars if treat~=. est store mc5_1 drop treat // Medium-wealth gen treat = allmig9400 qui replace treat = . if cat~=2 & treat==1 qui reg prod_app2_ds allmig9400 $allmig9400vars if treat~=. est store mp1_2 qui reg prod_app2_ds allmig9400 allrem9400 $allmig9400vars if treat~=. est store mp3_2 qui reg prod_app2_ds allmig94 allmig00 $allmig9400vars if treat~=. est store mp4_2 qui reg cons_app2_ds allmig9400 $allmig9400vars if treat~=. est store mc1_2 qui reg cons_app2_ds allmig9400 allrem9400 $allmig9400vars if treat~=. est store mc3_2 qui reg cons_app2_ds allmig94 allmig00 $allmig9400vars if treat~=. est store mc4_2 drop treat gen treat = rem9400 qui replace treat = . if cat~=2 & treat==1 qui reg prod_app2_ds rem9400 $allrem9400vars if treat~=. est store mp2_2 qui reg prod_app2_ds allrem94 allrem00 $allrem9400vars if treat~=. est store mp5_2 qui reg cons_app2_ds rem9400 $allrem9400vars if treat~=. est store mc2_2 qui reg cons_app2_ds allrem94 allrem00 $allrem9400vars if treat~=. est store mc5_2 drop treat // Rich gen treat = allmig9400 qui replace treat = . if cat~=3 & treat==1 qui reg prod_app2_ds allmig9400 $allmig9400vars if treat~=. est store mp1_3 qui reg prod_app2_ds allmig9400 allrem9400 $allmig9400vars if treat~=. est store mp3_3 qui reg prod_app2_ds allmig94 allmig00 $allmig9400vars if treat~=. est store mp4_3 qui reg cons_app2_ds allmig9400 $allmig9400vars if treat~=. est store mc1_3 qui reg cons_app2_ds allmig9400 allrem9400 $allmig9400vars if treat~=. est store mc3_3 qui reg cons_app2_ds allmig94 allmig00 $allmig9400vars if treat~=. est store mc4_3 drop treat gen treat = rem9400 qui replace treat = . if cat~=3 & treat==1 qui reg prod_app2_ds rem9400 $allrem9400vars if treat~=. est store mp2_3 qui reg prod_app2_ds allrem94 allrem00 $allrem9400vars if treat~=. est store mp5_3 qui reg cons_app2_ds rem9400 $allrem9400vars if treat~=. est store mc2_3 qui reg cons_app2_ds allrem94 allrem00 $allrem9400vars if treat~=. est store mc5_3 drop treat set more off set logtype text log using "/Users/fgarip/Documents/Development Paper Feb 07/Analyses Oct 2012/log files/ols treatreg ps/OLS_altspec_tableR3.txt", replace // Model 1 esttab mp1_1 mp1_2 mp1_3, keep(allmig9400) pr2 star(* 0.05 ** 0.01) se noparentheses nolines esttab mc1_1 mc1_2 mc1_3, keep(allmig9400) pr2 star(* 0.05 ** 0.01) se noparentheses nolines // Model 2 esttab mp2_1 mp2_2 mp2_3, keep(rem9400) pr2 star(* 0.05 ** 0.01) se noparentheses nolines esttab mc2_1 mc2_2 mc2_3, keep(rem9400) pr2 star(* 0.05 ** 0.01) se noparentheses nolines // Model 3 esttab mp3_1 mp3_2 mp3_3, keep(allmig9400 allrem9400) pr2 star(* 0.05 ** 0.01) se noparentheses nolines esttab mc3_1 mc3_2 mc3_3, keep(allmig9400 allrem9400) pr2 star(* 0.05 ** 0.01) se noparentheses nolines // Model 4 esttab mp4_1 mp4_2 mp4_3, keep(allmig94 allmig00) pr2 star(* 0.05 ** 0.01) se noparentheses nolines esttab mc4_1 mc4_2 mc4_3, keep(allmig94 allmig00) pr2 star(* 0.05 ** 0.01) se noparentheses nolines // Model 5 esttab mp5_1 mp5_2 mp5_3, keep(allrem94 allrem00) pr2 star(* 0.05 ** 0.01) se noparentheses nolines esttab mc5_1 mc5_2 mc5_3, keep(allrem94 allrem00) pr2 star(* 0.05 ** 0.01) se noparentheses nolines log cl */ /* **************************************************************************************** * Table R4. The effect of migration and remittances in 1993 or 1999 on the change ****** * in household assets from 1994 to 2000, matching estimates with restricted covariates * **************************************************************************************** global allmig9400vars "nodep_ec94 hhch94 noson94 nodaugh94 prod_p84s cons_p84s hhmig94 prev94" global rem9400vars "nodep_ec94 hhch94 noson94 nodaugh94 prod_p84s cons_p84s hhmig94 prev94 nmigm94 nmigf94 heduc94mig phhr94" // Remove covariates with large t-values (>10) - Reviewer C's idea // //////////////////////////////////////////////////////////////////// logit allmig9400 $allmig9400vars logit rem9400 $rem9400vars global allmig9400vars "nodep_ec94 prod_p84s cons_p84s hhmig94 prev94" set more off set logtype text log using "/Users/fgarip/Documents/Development Paper Feb 07/Analyses Oct 2012/log files/ols treatreg ps/PS_removelargets_tableR4.txt", replace // Poor gen treat = allmig9400 qui replace treat = . if cat~=1 & treat==1 bootstrap r(att), rep(25): psmatch2 treat $allmig9400vars, outcome(prod_app2_ds) common logit mahal($allmig9400vars) caliper(1) bootstrap r(att), rep(25): psmatch2 treat $allmig9400vars, outcome(cons_app2_ds) common logit mahal($allmig9400vars) caliper(1) drop treat // Medium-wealth gen treat = allmig9400 qui replace treat = . if cat~=2 & treat==1 bootstrap r(att), rep(25): psmatch2 treat $allmig9400vars, outcome(prod_app2_ds) common logit mahal($allmig9400vars) caliper(1) bootstrap r(att), rep(25): psmatch2 treat $allmig9400vars, outcome(cons_app2_ds) common logit mahal($allmig9400vars) caliper(1) drop treat //Rich gen treat = allmig9400 qui replace treat = . if cat~=3 & treat==1 bootstrap r(att), rep(25): psmatch2 treat $allmig9400vars, outcome(prod_app2_ds) common logit mahal($allmig9400vars) caliper(1) bootstrap r(att), rep(25): psmatch2 treat $allmig9400vars, outcome(cons_app2_ds) common logit mahal($allmig9400vars) caliper(1) log cl */