Code:
cap ssc installl psmatch2 sysuse auto,clear psmatch2 foreign mpg weight length, out(rep78) neighbor(1) common caliper(.05) ties pstest
Thanks!
clear sysuse auto psmatch2 foreign mpg weight length, out(rep78) neighbor(1) common caliper(.05) ties pstest regress mpg _treated [fw=_weight] test _treated display r(p)
sysuse auto,clear psmatch2 foreign mpg weight length, out(rep78) neighbor(1) common caliper(.05) ties pstest mvreg mpg weight length = _treat [fw=_weight]
gen variable = "" gen pvalue = . local l = 1 foreach var of varlist mpg weight length { replace variable = "`var'" in `l' replace pvalue = r(table)["pvalue", `=2*`l'-1'] in `l' local ++l }
. list variable pvalue if !mi(variable) +---------------------+ | variable pvalue | |---------------------| 1. | mpg .4582798 | 2. | weight .6133822 | 3. | length .4972447 | +---------------------+
Comment