您好,欢迎访问三七文档
当前位置:首页 > 临时分类 > 【计量】空间杜宾模型代码
空间杜宾模型stata代码clearallcdF:\stata14\ado\mydo\agglo**调入权重矩阵useWqiantaoinver.dta,clearkeeps*saveW2.dta,replace**矩阵转换为stata应用格式spatwmatusingW2,name(W)standardizematrixlistW***调入数据usedata11.21.dta,clear*对数生成genlnii=ln(ii)genlnp=ln(p)genlna=ln(a)genlnt=ln(t)genlnc=ln(c)*设定面板数据格式xtsetidyear**变量描述性统计localxiicpat//5个变量tabstat`x',s(meansdminp25p50p75max)///format(%6.4f)c(s)*****(2)estimation****SDMestimation(个体固定ind)//SpatialDurbinmodel(SDM)xsmlelniilnclnplnalnt,wmat(W)model(sdm)fetype(ind)nsim(500)nologeffectseststoreM_sptial//不要加入c三次方lna_2,使用第三产业,加入c_lng交乘项estatic//AICBICtest//SpatialDurbinmodel(时间固定time)xsmlelniilnclnplnalnt,wmat(W)model(sdm)fetype(time)nsim(500)nologeffectseststoreM_timeestatic//SpatialDurbinmodel(双固定,both)xsmlelniilnclnplnalnt,wmat(W)model(sdm)fetype(both)nsim(500)nologeffectseststoreM_bothestatic**结果汇总列表显示localmM_sptialM_timeM_bothesttab`m',mtitle(`m')nogaps(r2llaicbicN)///star(*0.1**0.05***0.01)b(%6.3f)esttabM_sptialM_timeM_bothusingpane0000.rtf//输出结果rtfexceldoc****hausmantestxsmlelniilnclnplnalnt,wmat(W)model(sdm)fetype(both)nsim(500)nologestimatesstoresdm_fexsmlelniilnclnplnalnt,wmat(W)model(sdm)retype(both)nsim(500)nologestimatesstoresdm_rehausmansdm_fesdm_re
本文标题:【计量】空间杜宾模型代码
链接地址:https://www.777doc.com/doc-8525034 .html