0% found this document useful (0 votes)
37 views7 pages

Bài Tập PSM Và Did

The document outlines methods for Propensity Score Matching (PSM) and Difference-in-Differences (DID) analysis, detailing various matching techniques such as nearest neighbor, radius, kernel, and stratification matching. It also provides regression methods for DID, including OLS regression and fixed effects models. Additionally, it includes examples and exercises using specific datasets to assess the impact of microcredit programs on female participants.

Uploaded by

lync21403
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views7 pages

Bài Tập PSM Và Did

The document outlines methods for Propensity Score Matching (PSM) and Difference-in-Differences (DID) analysis, detailing various matching techniques such as nearest neighbor, radius, kernel, and stratification matching. It also provides regression methods for DID, including OLS regression and fixed effects models. Additionally, it includes examples and exercises using specific datasets to assess the impact of microcredit programs on female participants.

Uploaded by

lync21403
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

CÂU LỆNH PSM VÀ DID

1. PHƯƠNG PHÁP PSM


l Propensity score matching with common support
pscore $treatment $xlist, pscore(myscore) blockid(myblock) comsup logit
CÁCH 1:
l Matching methods
ü Nearest neighbor matching
attnd $ylist $treatment, pscore(myscore) comsup
$ylist : là outcome ; treatment: biến tham gia CT
ü Radius matching
attr $ylist $treatment, pscore(myscore) comsup radius(0.001)
ü Kernel Matching
attk $ylist $treatment , pscore(myscore) comsup boot reps($breps)
$breps: số vòng lặp theo tuỳ chọn
ü Stratification Matching
atts $ylist $treatment, pscore(myscore) blockid(myblock) comsup
CÁCH 2: Dùng gói psmatch2
ü Mặc định:
psmatch2 y , outcome (biến kết quả) pscore (varname) common
ü Ghép cặp Kernel
psmatch2 y, out (biến kết quả) pscore (varname) kernel common
ü Ghép cặp bán kính
psmatch2 y , out (biến kết quả) pscore (varname) radius caliper(0.01)
ü Ghép cặp cận gần nhất
psmatch2 y, out ( biến kết quả ) pscore(varname) common noreplacement neighbor (1)
caliper (0.01)
2. PHƯƠNG PHÁP DID
Cách 1: HỒI QUY OLS
reg y treament time treament # time
Y: biến phụ thuộc (kết quả của can thiệp)
Treatment: là biến giả với giá trị 1: nhóm xử lý(treatted group), 0: nhóm kiểm soát(control
group)
Time : biến giả (1: thời điểm can thiệp, 0: trước thời điểm can thiệp)
treament # time: biến tương tác giữa biến treatment và time
Ø Cách 2: SỬ DỤNG GÓI CÂU LỆNH DIFF
diff Y, t(treatment) p(time)
diff Y, t(treatment) p(time) cov (Xi) report
Ø Cách 3: hồi quy dữ liệu bảng với hiệu ứng cố định
xtreg y time treatment # time Xi, fe i(id )
VÍ DỤ VỀ PSCORE

****************************************************
Algorithm to estimate the propensity score
****************************************************

The treatment is dfmfd

HH has
female
microcredit
participant
: 1=Y, 0=N Freq. Percent Cum.

0 534 47.30 47.30


1 595 52.70 100.00

Total 1,129 100.00

Estimation of the propensity score

Iteration 0: log likelihood = -780.91445


Iteration 1: log likelihood = -737.08184
Iteration 2: log likelihood = -736.71473
Iteration 3: log likelihood = -736.71461

Probit regression Number of obs = 1129


LR chi2(11) = 88.40
Prob > chi2 = 0.0000
Log likelihood = -736.71461 Pseudo R2 = 0.0566

dfmfd Coef. Std. Err. z P>|z| [95% Conf. Interval]

sexhead -.0153141 .1343983 -0.11 0.909 -.27873 .2481017


agehead .0039732 .0031326 1.27 0.205 -.0021666 .010113
educhead -.0400969 .0120517 -3.33 0.001 -.0637177 -.0164761
vaccess -.1609772 .1076142 -1.50 0.135 -.3718972 .0499427
pcirr .2333795 .1302629 1.79 0.073 -.021931 .4886901
rice -.0158624 .0253178 -0.63 0.531 -.0654844 .0337596
wheat .0130074 .0471693 0.28 0.783 -.0794428 .1054576
milk -.0031363 .0158907 -0.20 0.844 -.0342814 .0280089
oil .0212828 .0100652 2.11 0.034 .0015555 .0410102
lnland -.5420566 .0887917 -6.10 0.000 -.7160851 -.3680281
egg .1716924 .1362023 1.26 0.207 -.0952592 .4386441
_cons -.8779291 .61929 -1.42 0.156 -2.091715 .3358571

Note: the common support option has been selected


The region of common support is [.08928959, .78360568]

Description of the estimated propensity score


in region of common support

Estimated propensity score

Percentiles Smallest
1% .1518749 .0892896
5% .250235 .0972317
10% .3316451 .1074799 Obs 1,125
25% .4619702 .1097046 Sum of Wgt. 1,125

50% .5585412 Mean .5290272


Largest Std. Dev. .1334928
75% .6247123 .7562643
90% .6743091 .7576113 Variance .0178203
95% .6930495 .7820361 Skewness -.997976
99% .722669 .7836057 Kurtosis 3.618743

******************************************************
Step 1: Identification of the optimal number of blocks
Use option detail if you want more detailed output
******************************************************

The final number of blocks is 4

This number of blocks ensures that the mean propensity score


is not different for treated and controls in each blocks

**********************************************************
Step 2: Test of balancing property of the propensity score
Use option detail if you want more detailed output
**********************************************************

The balancing property is satisfied

This table shows the inferior bound, the number of treated


and the number of controls for each block

HH has female
Inferior microcredit
of block participant: 1=Y, 0=N
of pscore 0 1 Total

.0892896 28 8 36
.2 96 38 134
.4 280 296 576
.6 126 253 379

Total 530 595 1,125


Note: the common support option has been selected

*******************************************
End of the algorithm to estimate the pscore
*******************************************
GHÉP CẶP BẰNG GÓI PSMATCH2

. psmatch2 dfmfd, pscore(ps98) out (lexptot) common

Variable Sample Treated Controls Difference S.E. T-stat

lexptot Unmatched 8.45307857 8.44797659 .005101982 .030644787 0.17


ATT 8.45390402 8.34307215 .110831867 .042790467 2.59

Note: S.E. does not take into account that the propensity score is estimated.

psmatch2: psmatch2: Common


Treatment support
assignment Off suppo On suppor Total

Untreated 0 534 534


Treated 4 591 595

Total 4 1,125 1,129

. psmatch2 dfmfd, pscore(ps98) out (lexptot) kernel common

. psmatch2 dfmfd, pscore(ps98) out (lexptot) kernel common

Variable Sample Treated Controls Difference S.E. T-stat

lexptot Unmatched 8.45307857 8.44797659 .005101982 .030644787 0.17


ATT 8.45390402 8.34684827 .107055745 .033013993 3.24

Note: S.E. does not take into account that the propensity score is estimated.

psmatch2: psmatch2: Common


Treatment support
assignment Off suppo On suppor Total

Untreated 0 534 534


Treated 4 591 595

Total 4 1,125 1,129


. psmatch2 dfmfd, pscore(ps98) out (lexptot) common noreplacement neighbor (1) caliper (0.01)

Variable Sample Treated Controls Difference S.E. T-stat

lexptot Unmatched 8.45307857 8.44797659 .005101982 .030644787 0.17


ATT 8.45688946 8.35958755 .097301915 .03370254 2.89

Note: S.E. does not take into account that the propensity score is estimated.

psmatch2: psmatch2: Common


Treatment support
assignment Off suppo On suppor Total

Untreated 0 534 534


Treated 171 424 595

Total 171 958 1,129

. psmatch2 dfmfd, pscore(ps98) out (lexptot) radius caliper(0.001)

Variable Sample Treated Controls Difference S.E. T-stat

lexptot Unmatched 8.45307857 8.44797659 .005101982 .030644787 0.17


ATT 8.43861208 8.3257027 .112909378 .037846952 2.98

Note: S.E. does not take into account that the propensity score is estimated.

psmatch2: psmatch2: Common


Treatment support
assignment Off suppo On suppor Total

Untreated 0 534 534


Treated 97 498 595

Total 97 1,032 1,129

. psmatch2 dfmfd, pscore(ps98) out (lexptot) radius


VÍ DỤ VỀ DIFF
BÀI TẬP PSM VÀ DID

Bài tập 1: Sử dụng dữ liệu hh98.dta


l Xác định các yếu tố ảnh hưởng đến quyết định tham gia chương trình tín dung vi mô của
nữ (dfmfd) ?
Các yếu tố ảnh hưởng: sexhead, agehead, educhead, vaccess, pcirr, rice, wheat, milk, oil,
egg, lnland.
l Tính tác động của tham gia chương trình bằng các kỹ thuật ghép cặp
l Đánh giá chất lượng ghép cặp

Bài tập 2: Sử dụng dữ liệu hh_9198.dta


Tính tác động của tham gia tín dụng vi mô của nữ giới
a) Trường hợp sử dụng hồi quy OLS
b) Trường hợp sử dụng hiệu quả cố định
c) Trường hợp sử dụng hồi quy OLS bổ sung các biến kiểm soát : sexhead, agehead,
educhead, vaccess, pcirr, rice, wheat, milk, oil, egg, lnland.
d) Trường hợp sử dụng hiệu quả cố định bổ sung thêm các biến kiểm soát : sexhead,
agehead, educhead, vaccess, pcirr, rice, wheat, milk, oil, egg, lnland.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy