一文读懂处理效应模型操作及应用
来源:计量经济学服务中心2018-12-22推文,详情请阅读原文
一.处理效应模型命令简介
原始命令为: treatreg has been renamed to etregress.
现在更新为:etregress
etregress语法格式为:
Basic syntax *基础格式
etregress depvar [indepvars], treat(depvar_t = indepvars_t) [twostep|cfunction]
Full syntax for maximum likelihood estimates only ML估计格式
etregress depvar [indepvars] [if] [in] [weight], treat(depvar_t = indepvars_t [, noconstant]) [etregress_ml_options]
Full syntax for two-step consistent estimates only 2阶段一致估计
etregress depvar [indepvars] [if] [in], treat(depvar_t = indepvars_t [, noconstant]) twostep [etregress_ts_options]
Full syntax for control-function estimates only控制函数估计格式
etregress depvar [indepvars] [if] [in], treat(depvar_t = indepvars_t [, noconstant]) cfunction [etregress_cf_options]
选项介绍:
depvar :结果变量。
indepvars :直接影响结果变量depvar的自变量。
treat(depvar_t = indepvars_t [, noconstant]) 处理方程
noconstant :不包含截距项。
constraints(constraints) :应用线性约束
twostep表示使用两步法,默认MLE
first表示汇报第一阶段的Probit回归结果
二.处理效应模型操作应用
首先调用数据union3,
use union3
数据结构如下:
desc
下面使用Obtain full ML estimatesML估计格式
其中wage为工资,age grade smsa black tenure这些分别为自变量,而south black tenure为影响union的变量,union为处理变量
etregress wage age grade smsa black tenure, treat(union = south black tenure)
Obtain two-step consistent estimates 2阶段一致估计
etregress wage age grade smsa black tenure, treat(union = south black tenure) twostep
调用数据drugexp
use drugexp
Obtain control-function estimates for potential-outcome model控制函数估计格式
etregress lndrug chron age lninc, treat(ins=age married lninc work) poutcomes cfunction