自变量:trans_1
因变量:lnfeducation
协变量:gender married work education_f education_m lnfincome lne_mail fasset
代码:egen trans1_p25=pctile(trans1), p(25)
egen trans1_p50=pctile(trans1), p(50)
egen trans1_p75=pctile(trans1), p(75)
generate cut=trans1_p25 if trans1<=trans1_p25
replace cut=trans1_p50 if trans1>trans1_p25 & trans1<=trans1_p50
replace cut=trans1_p75 if trans1>trans1_p50 & trans1<=trans1_p75
replace cut=0.0770572 if trans1>trans1_p75
matrix tp=(10\20\30\40\50\60\70\80\90\100)
doseresponse2 gender married work education_f education_m lnfincome lne_mail fasset, outcome(lnfeducation) t(trans1) gpscore(gps) predict(t_hat) sigma(sd) cutpoints(cut) index(mean) nq_gps(4) t_transf(ln) family(bin) link(logit) dose_response(does) tpoints(tp) delta(1) reg_type_t(cubic) reg_type_gps(cubic) interaction(1) bootstrap(yes) boot_reps(200) analysis(yes) filename("gpsm1") graph("gpsm1") detail
结果:
********************************************
ESTIMATE OF THE GENERALIZED PROPENSITY SCORE
********************************************
Generalized Propensity Score
******************************************************
Algorithm to estimate the generalized propensity score
******************************************************
Estimation of the propensity score
The log transformation of the treatment variable trans1 is used
T
-------------------------------------------------------------
Percentiles Smallest
1% -4.906392 -4.906392
5% -4.897616 -4.906392
10% -4.897616 -4.906392 Obs 9,297
25% -4.490526 -4.906392 Sum of wgt. 9,297
50% -3.668333 Mean -3.84712
Largest Std. dev. .6275509
75% -3.386563 -2.563208
90% -3.223094 -2.563208 Variance .3938201
95% -3.130241 -2.563208 Skewness -.4166525
99% -2.563208 -2.563208 Kurtosis 1.968049
dependent variable T has negative values
r(499);
end of do-file
r(499);


雷达卡



京公网安备 11010802022788号







