楼主: 逐梦的太阳
67260 93

[学者访谈] [赵西亮]厦门大学经济学院和王亚南经济研究院经济学教授、博士生导师赵西亮在线访谈 [推广有奖]

81
XiliangZhao 发表于 2020-7-10 21:56:09
不考清华北大不改名 发表于 2020-7-2 16:09
赵老师您好,请问在回归分析中,多重共线的问题是否需要关注,特别是在中介效应分析中,中介变量很容易与被 ...
多重共线不是问题,作为研究者,你对问题的思考和研究设计,应该基本上就将多重共线问题排除了。多重共线如果出现,实际上说明你选择的指标是重复的,研究设计没搞好。如果你关注的是预测,多重共线有时反而有帮助。

82
不考清华北大不改名 学生认证  发表于 2020-7-12 11:18:16
XiliangZhao 发表于 2020-7-10 21:56
多重共线不是问题,作为研究者,你对问题的思考和研究设计,应该基本上就将多重共线问题排除了。多重共线 ...
感谢老师解答疑惑,学习到了

83
paulwong 发表于 2020-7-14 09:26:01
XiliangZhao 发表于 2020-7-10 21:50
不好意思,漏掉你的问题。
(1)个体效应都控制了,行业效应应该是加不进去的,因为用FE方法时,进行demea ...
非常感谢赵老师细心的回答,第二个问题分析得非常透彻,受益匪浅,再次感谢。

84
XiliangZhao 发表于 2020-7-17 13:28:33
hahahoby 发表于 2020-7-1 07:55
赵老师 您好,最近在用合成控制法做研究   有一个不太会,在安慰剂检验中不少人用等间距方法进行随机抽样作 ...
画安慰剂图,都需要通过编程的方式实现,下面我提供一个我写的程序供大家参考



*======================================

*合成控制法假设检验(Placebo test and draw graph)*

*======================================

set more off

use smoking,clear

tsset state year

* 获取一些后文要用的参数

qui tab state

local n = r(r) // 州数

qui tab year

local n_year = r(r) // 年份数



*======================================

*根据个人研究需要,调整这些参数

*======================================

local date_t = "1989" // 干预时间点

local m = 2 // 限制MSPE为干预州MSPE的m倍,m=0表示无限制

*local slow = "nested" // 取消*使用nested选项,计算量大,拟合更好

local id_t=3 // 干预州的id或行号

local treat_name ="California" // 图中显示的干预组名称

local ctrl_name="Control States" // 图中显示的控制组名称

local xtitle "year" // 横轴变量名称

local ytitle "gap in per-capita cigarette sales (in packs)" //纵轴变量名称

local saving "syn_plot" //保存安慰剂检验图

*======================================



tempname resmat



forvalues i=1/`n' {        

synth cigsale beer lnincome retprice age15to24 cigsale(1988) cigsale(1980) cigsale(1975) , ///

trunit(`i') trperiod(`date_t') xperiod(1980(1)1988) `slow' keep(tmp`i', replace)

//上述循环命令分别对所有州作为干预组进行合成, tmp`I'.dta保存合成结果

local rmspe = e(RMSPE)[1,1] //取RMSPE



use tmp`i',clear

keep _Y_treated _Y_synthetic _time

gen te = _Y_treated- _Y_synthetic

gen id = `i'

keep in 1/`n_year' //1970-2000, there are 31 years, which is keep in the first 31 obs.

gen te2 = te*te // use it to calculate MSPE

local n_before = `date_t' - _time[1] //取干预期之前对应位置或序号

local n_after = `n_before' + 1 //干预期起点

qui sum te2 in 1/`n_before' // MSPE

local mspe_pre = r(mean) // 干预前的MSPE

qui sum te2 in `n_after'/`n_year'

local mspe_post = r(mean) // 干预后的MSPE

local r = `mspe_post'/`mspe_pre' //计算Abadie-R统计量



matrix `resmat' = nullmat(`resmat')\(`rmspe', `mspe_pre', `mspe_post', `r') //resmat saves the RMSPE for each model

local names `"`names'`"`i'"'"' // names of each



save tmp`i', replace



use smoking,clear

tsset state year

}

       mat colnames `resmat' = "RMSPE"  "MSPE_pre" "MSPE_post" "Abadie_R"

       mat rownames `resmat' = `names'

       matlist `resmat', row("Treated Unit")



*Placebo Graphs - Draw Figure 3

*Get the RMSPE of the treated unit



local RMSPE_t=`resmat'[`id_t',1]

use tmp1, clear

local num = 0 // # of units includes in the graph

forvalues i=2/`n' {

       if `m'==0 {

              append using tmp`i'

              local num = `num' + 1

       }

       else if `resmat'[`i',1]^2<=`m'*`RMSPE_t'^2 { // MSPE comparation

              append using tmp`i'

              local num = `num' + 1

       }

}





*======================================

*画安慰剂图1



local s="" // string to store the graph command

local controls = "" //string to store the id of control units used

local num_t = `num'+1 // # postion to identify the treated unit



levelsof id, local(levels)

foreach l of local levels {

       if `l'!=`id_t' {

       local s = "`s'"+"(line te _time if id==`l', lc(gs13))"

       local controls = "`controls'"+" "+"`l'"

       }

}



local date_before = `date_t'-1

two `s'(line te _time if id==`id_t', lc(black)), ///

legend(order(`num_t' "`treat_name'" `num' "`ctrl_name'") cols(1) pos(11) ring(0)) xline(`date_before', lp(dot) lc(black)) yline(0, lp(dash) lc(black)) ///

xlabel(1970(5)2000) xtitle("`xtitle'") ytitle("`ytitle'") saving(`saving'_`m', replace)



di "# of controls after limit `m' times of RMSPE of treated unit: " `num' //显示保留的控制组数量

di "ID of controls:" "`controls'" //显示保留的控制组id或序号





*======================================

*画出Abadie-R统计量分布图,Abadie et al. (2010)

*======================================

clear

svmat `resmat', names(col)

save tmp_R, replace //unstar this line if you want to save the file



histogram Abadie_R, freq width(1) text(1 77 "California {&rarr}", placement(s)) xtitle("post/pre-Proposition 99 mean squared prediction error")





*======================================

*删除所有临时文件

!del tmp*



set more on

exit

85
湘江之水 发表于 2020-8-11 11:42:00
15254173521 发表于 2020-6-15 16:42
老师,请问,新手用系统Gmm,做实证研究,对于数据和模型,检验等方面有哪些需要特别注意的地方吗?
经济学中的因果推断方法培训课程(国庆班)【赵西亮教授独家分享】

86
湘江之水 发表于 2020-8-11 11:42:41
wyq52235307 发表于 2020-6-15 17:05
老师您好,请问一下GARCH类的模型是用来干嘛的啊,它预测的是序列的波动率还是序列未来的值呢。
经济学中的因果推断方法培训课程(国庆班)【赵西亮教授独家分享】

87
湘江之水 发表于 2020-8-11 11:43:01
paulwong 发表于 2020-6-16 09:56
赵老师好,请教2个问题:(1)面板数据固定效应回归时,在控制个体效应和时间效应的前提下,有研究同时控制 ...
经济学中的因果推断方法培训课程(国庆班)【赵西亮教授独家分享】

88
湘江之水 发表于 2020-8-11 11:43:54
dreamhour 发表于 2020-6-16 13:46
想请教一下老师,截面数据中,联立方程组中的内生变量如何检验,如果联立方程组是 y1=a0+a1x1+a2x2+a3y2+u1 ...
经济学中的因果推断方法培训课程(国庆班)【赵西亮教授独家分享】

89
湘江之水 发表于 2020-8-11 11:44:31
满壶俗人酒 发表于 2020-6-16 14:09
赵老师您好!您的大作《基本有用的计量经济学赵西亮》深入浅出、通俗易懂,使广大经济学子受益匪浅,诚挚向 ...
经济学中的因果推断方法培训课程(国庆班)【赵西亮教授独家分享】

90
湘江之水 发表于 2020-8-11 11:44:55
小鱼要毕业 发表于 2020-6-22 09:12
赵老师您好,去年购买您的《基本有用的计量经济学》,您接下来还有出书计划吗?另外您那里招博士后吗?入站 ...
经济学中的因果推断方法培训课程(国庆班)【赵西亮教授独家分享】

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
扫码
拉您进交流群
GMT+8, 2026-1-29 02:13