I am still figuring out PSM for my study.I am having trouble in the first step matching. When i graph the histogram for before and after matching there is not much of a difference in the two. I am not sure if it is because the confounding variables i have selected are weak or it is because there is something wrong in the way my codes are formed. Could it be that the dataset i have the treated and control groups are already balanced? but this is a cross sectional data not RCT. I am desperately looking for some help and clarity so i can move on to evaluating ATT. Thank you so much for all the help.
in STEP 1: i use the probit
Code:
probit $TREAT $HH $GEO $HH_RESP predict pre_probit, p
Code:
psmatch2 $TREAT $HH $GEO $HH_RESP sum _pscore sum _pscore if $TREAT ==1 sum _pscore if $TREAT ==0 psgraph
in Step 3: i make a two way histogram before matching
Code:
**Before matching overlaid Histograms twoway (histogram _pscore if $TREAT==1, blcolor("255 0 0") bfcolor(none)) (histogram _pscore if $TREAT==0, blcolor(teal) bfcolor(none))
Code:
*** histogram: viusal analysis //***Matching Quality***// sum _pscore & _weight~=. sum _pscore if $TREAT ==1 & _weight~=. sum _pscore if $TREAT ==0 & _weight~=. histogram _pscore if $TREAT==1 & _weight~=.,frequency histogram _pscore if $TREAT==0 & _weight~=.,frequency *psm twoway (histogram _pscore if $TREAT == 0, blcolor("red") bfcolor(none) legend(label(1 "M"))) (histogram _pscore if $TREAT == 1, blcolor(teal) bfcolor(none) legend(label(2 "N"))), name(PSM_grp_1) twoway (histogram _pscore if $TREAT == 0 & _weight ~=., frequency fcolor(none) lcolor(red) lpattern(solid) legend(label(1 "M"))) (histogram _pscore if $TREAT == 1 & _weight ~=., frequency fcolor(none) lcolor(teal) lpattern(solid) legend(label(2 "N"))), name (PSM_grp_2)
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float migrant byte language float dep_ratio byte(ind_hou shrd_hou temp_hou district jamoat) int village byte(HHH rel_spouse married unmarried widowed divorced) float(S1C_age age2) 0 1 .11111111 1 0 0 1 1 19 0 1 1 0 0 0 46 2116 0 1 .16666667 1 0 0 6 23 63 0 1 1 0 0 0 37 1369 1 1 .22222222 1 0 0 1 1 19 0 1 1 0 0 0 30 900 1 1 .16666667 0 1 0 1 1 19 0 0 1 0 0 0 46 2116 0 1 .44444445 1 0 0 6 23 63 0 1 1 0 0 0 55 3025 1 1 .11111111 0 1 0 1 1 19 0 1 1 0 0 0 60 3600 1 1 .22222222 1 0 0 6 23 63 0 0 1 0 0 0 31 961 1 1 .22222222 1 0 0 1 1 19 0 1 1 0 0 0 35 1225 1 1 .16666667 1 0 0 6 23 63 0 1 1 0 0 0 51 2601 1 1 .22222222 1 0 0 6 22 62 0 1 1 0 0 0 38 1444 1 1 .16666667 0 1 0 1 1 19 1 0 0 0 1 0 59 3481 1 1 .3333333 1 0 0 6 22 62 0 1 1 0 0 0 45 2025 1 1 .2777778 1 0 0 1 1 19 0 1 1 0 0 0 29 841 0 1 .2777778 0 1 0 1 1 19 0 1 1 0 0 0 66 4356 0 1 .2777778 1 0 0 6 22 62 0 0 1 0 0 0 24 576 1 0 .16666667 1 0 0 6 22 62 0 1 1 0 0 0 50 2500 1 1 .16666667 1 0 0 6 22 61 0 1 1 0 0 0 29 841 1 1 .22222222 0 1 0 1 1 19 0 0 1 0 0 0 50 2500 1 1 .3333333 1 0 0 6 22 61 0 0 1 0 0 0 25 625 0 1 .44444445 0 1 0 1 1 19 0 0 0 0 1 0 54 2916 1 1 .16666667 1 0 0 6 22 61 0 1 1 0 0 0 59 3481 1 1 .2777778 0 1 0 1 1 19 0 0 0 0 1 0 65 4225 0 1 .05555556 1 0 0 6 22 61 0 1 1 0 0 0 56 3136 0 1 .2777778 1 0 0 1 1 19 0 0 1 0 0 0 36 1296 0 1 .11111111 1 0 0 6 21 60 0 1 1 0 0 0 64 4096 0 1 .22222222 1 0 0 6 21 60 0 1 1 0 0 0 59 3481 0 1 .3888889 1 0 0 6 22 57 0 0 1 0 0 0 64 4096 1 1 .44444445 1 0 0 6 20 57 1 0 0 0 1 0 64 4096 1 1 .44444445 1 0 0 6 20 57 0 0 1 0 0 0 33 1089 1 1 .2777778 1 0 0 6 20 57 0 1 1 0 0 0 54 2916 0 1 0 1 0 0 6 18 54 0 1 1 0 0 0 76 5776 0 1 .11111111 1 0 0 6 18 54 0 1 1 0 0 0 44 1936 0 1 .05555556 1 0 0 6 18 54 0 0 0 1 0 0 27 729 1 1 .22222222 1 0 0 6 18 54 0 0 1 0 0 0 26 676 1 1 .05555556 1 0 0 1 1 20 0 1 1 0 0 0 46 2116 0 1 .11111111 1 0 0 6 18 54 0 1 1 0 0 0 48 2304 0 1 .16666667 1 0 0 1 1 20 0 1 1 0 0 0 50 2500 1 1 .11111111 1 0 0 6 18 54 1 0 0 0 1 0 63 3969 0 1 .22222222 0 1 0 1 1 20 0 0 0 0 1 0 52 2704 1 1 .16666667 1 0 0 6 21 60 0 0 0 0 1 0 35 1225 1 1 .16666667 1 0 0 1 1 20 0 0 0 0 1 0 31 961 0 1 .2777778 1 0 0 6 21 60 0 1 1 0 0 0 42 1764 1 1 .2777778 0 1 0 1 1 20 0 0 1 0 0 0 43 1849 1 1 .6111111 1 0 0 6 18 53 1 0 0 0 1 0 51 2601 1 1 .3333333 1 0 0 6 18 53 0 1 1 0 0 0 47 2209 1 1 .6666667 0 1 0 1 1 20 0 0 1 0 0 0 35 1225 1 1 .16666667 0 1 0 1 1 20 1 0 0 0 1 0 50 2500 0 1 .2777778 1 0 0 6 18 53 0 1 1 0 0 0 41 1681 1 1 1.0555556 0 1 0 1 1 20 0 0 1 0 0 0 37 1369 1 1 .11111111 1 0 0 6 18 53 0 1 1 0 0 0 37 1369 0 1 .3333333 0 1 0 1 1 20 0 0 1 0 0 0 33 1089 1 1 .22222222 1 0 0 6 18 53 0 1 1 0 0 0 35 1225 0 1 0 1 0 0 1 1 20 0 0 1 0 0 0 49 2401 0 1 0 1 0 0 6 21 60 0 1 1 0 0 0 54 2916 0 1 .11111111 1 0 0 1 1 20 0 1 1 0 0 0 39 1521 0 1 .44444445 1 0 0 6 18 53 0 1 1 0 0 0 34 1156 0 1 .3333333 1 0 0 6 23 64 0 0 1 0 0 0 26 676 1 1 .6111111 0 1 0 1 1 20 0 1 1 0 0 0 57 3249 1 1 .3333333 1 0 0 6 23 64 0 0 1 0 0 0 31 961 0 1 .11111111 1 0 0 6 23 64 0 1 1 0 0 0 48 2304 0 1 .3333333 1 0 0 6 23 64 0 1 1 0 0 0 41 1681 1 1 .3333333 1 0 0 6 23 64 0 1 1 0 0 0 67 4489 1 1 .11111111 1 0 0 6 23 64 0 1 1 0 0 0 55 3025 1 0 .22222222 1 0 0 6 21 59 0 1 1 0 0 0 33 1089 1 1 .22222222 0 1 0 6 19 56 0 1 1 0 0 0 45 2025 0 1 .22222222 1 0 0 6 19 56 0 1 1 0 0 0 31 961 0 1 .2777778 1 0 0 6 19 55 0 1 1 0 0 0 62 3844 1 1 .2777778 1 0 0 6 19 55 0 0 0 0 1 0 56 3136 1 1 .11111111 1 0 0 6 19 55 0 0 1 0 0 0 22 484 1 1 0 0 1 0 1 6 21 0 1 1 0 0 0 50 2500 1 1 .11111111 1 0 0 6 19 55 0 0 1 0 0 0 23 529 1 1 .11111111 1 0 0 1 6 21 0 1 1 0 0 0 50 2500 1 1 .16666667 1 0 0 6 19 55 0 1 1 0 0 0 47 2209 1 1 .2777778 1 0 0 1 6 21 0 0 1 0 0 0 67 4489 0 1 .16666667 1 0 0 6 19 55 0 1 1 0 0 0 41 1681 1 1 .16666667 1 0 0 6 21 59 0 1 1 0 0 0 37 1369 1 1 .3888889 0 1 0 1 6 21 0 1 1 0 0 0 61 3721 1 1 .16666667 1 0 0 6 21 59 0 1 1 0 0 0 25 625 1 1 .8333333 0 1 0 1 6 21 0 0 0 0 1 0 32 1024 1 1 .3333333 1 0 0 6 21 59 1 0 0 0 1 0 53 2809 0 1 .16666667 1 0 0 1 6 21 0 0 0 0 1 0 63 3969 1 1 .11111111 1 0 0 6 19 56 0 1 1 0 0 0 28 784 0 1 .22222222 1 0 0 6 23 63 0 1 1 0 0 0 38 1444 0 1 .16666667 1 0 0 1 6 21 0 1 1 0 0 0 36 1296 0 1 .22222222 0 1 0 1 6 21 0 0 1 0 0 0 26 676 1 1 .22222222 1 0 0 1 6 21 0 0 1 0 0 0 26 676 1 1 .2777778 1 0 0 1 6 21 0 1 1 0 0 0 40 1600 1 1 .05555556 1 0 0 1 6 21 0 1 1 0 0 0 44 1936 1 1 .11111111 1 0 0 1 6 21 0 1 1 0 0 0 39 1521 1 1 .11111111 0 1 0 1 6 22 0 1 1 0 0 0 48 2304 1 1 .11111111 0 1 0 1 6 22 0 1 1 0 0 0 42 1764 0 1 .16666667 1 0 0 1 6 22 1 0 1 0 0 0 56 3136 0 1 .05555556 1 0 0 1 6 22 0 1 1 0 0 0 54 2916 0 1 .11111111 1 0 0 1 6 22 0 1 1 0 0 0 45 2025 0 1 .11111111 1 0 0 1 6 22 0 1 1 0 0 0 41 1681 0 1 .11111111 0 1 0 1 6 22 0 1 1 0 0 0 55 3025 1 1 .3888889 0 1 0 1 6 22 0 1 1 0 0 0 50 2500 0 1 .16666667 0 1 0 1 6 22 1 0 0 0 1 0 57 3249 0 1 .22222222 1 0 0 1 6 22 0 1 1 0 0 0 33 1089 0 1 .11111111 0 1 0 1 6 22 0 0 1 0 0 0 25 625 end
0 Response to Propensity Score Matching
Post a Comment