全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
1412 2
2022-11-27
各位大神,想参考The Big Bank(Beck,2010)一文,想用stata如何作weibull(韦伯)分布的生存分析模型,以验证多时点DID的政策实施时间与被解释变量无关,从而检验内生性,但是对模型背后的原理不了解,不知道怎么改代码,同时也不知道应该在论文里怎么写出回归模型的方程。谢谢,谢谢,谢谢。以下是文章的代码


**********************************************************************************************************************************
*** Date:    December 2009
*** Authors: Beck, Levine, and Levkov
*** Purpose: Create Table I in "Big Bad Banks? The Winners and Losers from Bank Deregulation in the United States"
*** Note:    Please change the working directories below
**********************************************************************************************************************************

#delimit;
clear;
set mem 100m;
set more off;

cd "/home/alevkov/BeckLevineLevkov2010";

log using TableI.log, replace;

use "/home/alevkov/BeckLevineLevkov2010/data/macro_workfile.dta", clear;

keep if ks99==1;
drop if inter1 == . | inter2 == .;

replace gini = gini * 100;

label var gini "Gini coefficient of income inequality";

replace wrkyr = wrkyr - 1975;

local financialXs ass4_ass cap_dif4 inter1 ins_dum inter2 e_interp dem uniform lncon1 unit bankpow;
local laborXs gsp_pc_growth prop_blacks prop_dropouts prop_female_headed unemploymentrate;

stset wrkyr death, id(statefip);

streg gini, robust cluster(statefip) dist(weibull) time;
estimates store m1, title((1));

streg gini `laborXs', robust cluster(statefip) dist(weibull) time;
estimates store m2, title((2));

streg gini `financialXs', robust cluster(statefip) dist(weibull) time;
estimates store m3, title((3));

streg gini `laborXs' `financialXs', robust cluster(statefip) dist(weibull) time;
estimates store m4, title((4));

streg gini `laborXs' `financialXs' reg1-reg3, robust cluster(statefip) dist(weibull) time;
estimates store m5, title((5));

estout m1 m2 m3 m4 m5 using TableI.txt, replace
keep(gini)
cells(b(star fmt(2)) se(par)) stats(N, labels(Observations) fmt(0))
legend label collabel(none)  
prehead("Table I" "Timing of Bank Deregulation and Pre-Existing Income Inequality: The Duration Model")
posthead("") prefoot("")
postfoot("")
starlevel(* 0.10 ** 0.05 *** 0.01) nolz nolegend;


log close;

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2024-7-19 17:47:45
可以看一下 连享会的这篇推文 https://www.lianxh.cn/news/0de16d365945e.html
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2024-11-27 18:29:21
meng_jy 发表于 2024-7-19 17:47
可以看一下 连享会的这篇推文 https://www.lianxh.cn/news/0de16d365945e.html
您好请问生存分布模型可以控制个体固定效应吗?

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群