Dear All,
This is my first time using Stata, would you guys please help me to check my command code?
*Treatment: GreenBond
*Outcome: GreenIssuer
*Independent: Total Assets,PBratio, RNDTA
Below are the command code I found in Internet.
import excel "G:\CSR\DATA\Issuer 2.0.xlsx", sheet("exclude underwriter") firstrow
estimate pscore//
pscore GreenBond Total Assets PBratio RNDTA, pscore(mypscore) blockid(myblock) comsup logit
psgraph, treated(GreenBond) pscore(mypscore)
using nnm(ATET)//
attnd GreenIssuer GreenBond, pscore(mypscore) comsup dots detail
looking for the matched pairs after using nnm//
gen id = _n
sort id
teffects psmatch (GreenIssuer) (GreenBond Total Assets PBratio RNDTA), gen(match20) atet nn(1)
generate GreenIssuer_1 = GreenIssuer if GreenBond==1
generate GreenIssuer_0 = GreenIssuer if GreenBond==0
replace GreenIssuer_1 = GreenIssuer[match201[_n]] if GreenBond==0
replace GreenIssuer_0 = GreenIssuer[match201[_n]] if GreenBond==1
gen id_of_first_match = id[match201[_n]]
list id* GreenBond match201 GreenIssuer* if inlist(id,1,481), noobs ab(20)
list id* GreenBond match201 GreenIssuer* if inlist(id,1-481), noobs ab(20)
list id* GreenBond match201 GreenIssuer* if inlist(id,1-481)
I have some questions as well.
1. I tried to estimate pscore, and the results showed "the inferior bound, the number of treated and the number of controls for each block" of which 343 controls and 28 treated, and the total is 371. Is 371 the matched pairs?
2. After that, I tried to use Nearest Neighbor Matching, and I got the results:
n. treatment (28) n. contr. (46) ATT (0.179) Std. Err. (0.062) t (2.867), with the note "the numbers of treated and controls refer to actual nearest neighbor matches".
What does this mean? Is 74 (28+40) the matched pairs?
3. May I know the command of nnm with replacement? I tried to add nn() in my code above (attnd GreenIssuer GreenBond, pscore(mypscore) comsup dots detail) but I failed.
4. I wish to know the exact matched pairs, so I used gen(), but the matched pairs I got is 436, it's different from both 371 and 74.
Please let me know if there's anything wrong. I really appreciate for your help, thank you so much in advance.
This is my first time using Stata, would you guys please help me to check my command code?
*Treatment: GreenBond
*Outcome: GreenIssuer
*Independent: Total Assets,PBratio, RNDTA
Below are the command code I found in Internet.
import excel "G:\CSR\DATA\Issuer 2.0.xlsx", sheet("exclude underwriter") firstrow
estimate pscore//
pscore GreenBond Total Assets PBratio RNDTA, pscore(mypscore) blockid(myblock) comsup logit
psgraph, treated(GreenBond) pscore(mypscore)
using nnm(ATET)//
attnd GreenIssuer GreenBond, pscore(mypscore) comsup dots detail
looking for the matched pairs after using nnm//
gen id = _n
sort id
teffects psmatch (GreenIssuer) (GreenBond Total Assets PBratio RNDTA), gen(match20) atet nn(1)
generate GreenIssuer_1 = GreenIssuer if GreenBond==1
generate GreenIssuer_0 = GreenIssuer if GreenBond==0
replace GreenIssuer_1 = GreenIssuer[match201[_n]] if GreenBond==0
replace GreenIssuer_0 = GreenIssuer[match201[_n]] if GreenBond==1
gen id_of_first_match = id[match201[_n]]
list id* GreenBond match201 GreenIssuer* if inlist(id,1,481), noobs ab(20)
list id* GreenBond match201 GreenIssuer* if inlist(id,1-481), noobs ab(20)
list id* GreenBond match201 GreenIssuer* if inlist(id,1-481)
I have some questions as well.
1. I tried to estimate pscore, and the results showed "the inferior bound, the number of treated and the number of controls for each block" of which 343 controls and 28 treated, and the total is 371. Is 371 the matched pairs?
2. After that, I tried to use Nearest Neighbor Matching, and I got the results:
n. treatment (28) n. contr. (46) ATT (0.179) Std. Err. (0.062) t (2.867), with the note "the numbers of treated and controls refer to actual nearest neighbor matches".
What does this mean? Is 74 (28+40) the matched pairs?
3. May I know the command of nnm with replacement? I tried to add nn() in my code above (attnd GreenIssuer GreenBond, pscore(mypscore) comsup dots detail) but I failed.
4. I wish to know the exact matched pairs, so I used gen(), but the matched pairs I got is 436, it's different from both 371 and 74.
Please let me know if there's anything wrong. I really appreciate for your help, thank you so much in advance.