空间计量软件代码资源集锦(Matlab/R/Python/SAS/Stata), 不再因空间效应而感到孤独
栏目:网络资讯 发布时间:2025-04-19
空间计量软件代码资源集锦(Matlab/R/Python/SAS/Stata), 不再因空间效应而感到孤独凡是搞计量经济的,都关注这个号了邮箱:economet

空间计量软件代码资源集锦(Matlab/R/Python/SAS/Stata), 不再因空间效应而感到孤独

凡是搞计量经济的,都关注这个号了

箱:econometrics666@sina.cn

所有计量经济圈方法论丛的do文件, 微观数据库和各种软件都放在社群里.建议到空间计量研究小组交流访问.计量经济圈空间计量研究小组@陈鑫—同济大学在读博士.

空间计量研究小组推荐

1.空间计量百科全书式的使用指南

2.空间计量经济学最新进展和理论框架

3.空间计量模型选择、估计、权重、检验

4.空间和时间的计量,关注二位国人

咱们空间计量研究小组已经聚集了一大批空间计量专业学者。今天,将给圈友们分享一些空间计量软件代码资源集锦,通过这些资源能够对空间计量有一个整体的把握。如果对空间计量感兴趣且有一些专业基础知识,欢迎到空间计量研究小组交流访问(文后“阅读原文”)。

空间计量百科全书式的使用指南百科指南

空间计量百科全书式的使用指南的do file公开

空间计量的46页Notes, 区经相关学者可参阅

1)Matalb 代码资源:
Elhorst J.P.: 

https://spatial-panels.com/software/
James P. LeSage:

https://www.spatial-econometrics.com/
Donald J. Lacombe:

http://myweb.ttu.edu/dolacomb/matlab.html

2)R代码资源:
CRAN Task View:

https://cran.r-project.org/web/views/Spatial.html

3)Python代码资源:
PySAL: 

https://pysal.readthedocs.io/en/latest/users/tutorials/index.html

4)Stata代码资源:具体操作详见计量经济圈里的《空间计量的46页Notes, 区经相关学者可参阅》:

创建空间权重矩阵

l  spmat –Create and manage spatial-weighting matrix objects  [Author: Drukker et.al,2013]

l  spatwmat—Spatial weights matrices for spatial data analysis  [Author: Pisati ,2012]

l  spwmatrix— Generates, imports, and exports spatial weights  [Author: Jeanty, updated 2014.03.15]

l  spwmatfill —Assigns first nearest neighbors to observations with no contiguous neighbors.   [Author: Jeanty, 2010]

l  spweight — Module to compute Cross-Section and Panel SpatialWeight Matrix  [Author: Shehata, 2013]

l  spweightxt– Module to compute Cross-Section and Panel Spatial Weight Matrix  [Author: Shehata,2013]

l  spweightcs —Module to computeCross Section Spatial Weight Matrix  [Author: Shehata, 2013]

l  spcs2xt—Module to Convert Cross Section to Panel Spatial Weight Matrix  [Author: Shehata, 2012]

l  shp2dta —Module to converts shape boundary files to Stata datasets  [Author: Crow, 2013]

空间自相关检验

l  spautoc –Stata modules to calculate spatial autocorrelation  [Author: Nicholas Cox et.al,2006]

l  spatgsa –Measures of global spatial autocorrelation [Author: Maurizio Pisati, 2001]

l  spatlsa –Measures of local spatial autocorrelation [Author: Maurizio Pisati, 2001]

l  spatcorr –Stata modules to compute and plot spatial autocorrelation  [Author: Maurizio Pisati, 2001]

l  spatdiag –Diagnostic tests for spatial dependence in OLS regression  [Author: Maurizio Pisati, 2001]

l  anketest–Moduleto perform diagnostic tests for spatial autocorrelation in the residuals ofOLS, SAR, IV, and IV-SAR models

l  splagvar-Moduleto generate spatially lagged variables, construct the Moran Scatter plot, andcalculate Moran’s I statistics

空间截面回归

l  spatreg- Moduleto estimate the spatial lag and the spatial error regression models by maximumlikelihood.

l  spmlreg–Moduleto estimate the spatial lag, the spatial error, the spatial durbin, and thegeneral spatial models by maximum likelihood

l  spautoreg–Moduleto estimate Spatial Cross Sections Regression (Lag-Error-Durbin-SAC-SPGKS-SPGSAR-GS2SLS-GS3SLS-SPML-SPGS-SPIVREG-IVTobit)

l  sppack–Modulefor cross-section spatial-autoregressive models

l  gs2sls-Moduleto estimate Generalized Spatial Two Stage Least Squares Cross Sections Regression

l  gs2slsar–Module to estimate GeneralizedSpatial Autoregressive Two Stage Least Squares Cross Sections Regression

l  gs3sls–Moduleto estimate Generalized Spatial Three Stage Least Squares Cross SectionsRegression (3SLS)

l  gs3slsar–Module to estimate GeneralizedSpatial Autoregressive Three Stage Least Squares (3SLS) Cross SectionsRegression

l  spgmm–Moduleto estimate Spatial Autoregressive Generalized Method of Moments Cross SectionsRegression

l  spregsac–Module to estimate Maximum Likelihood Estimation AutoCorrelation (SAC) CrossSection Regression

l  spregsar–Moduleto estimate Maximum Likelihood Estimation Spatial Lag Cross Sections Regression

l  spregsdm–Moduleto Estimate Maximum Likelihood Estimation Spatial Durbin Cross SectionsRegression

l  spregsem–Module to Estimate Maximum LikelihoodEstimation Spatial Error Cross Sections Regression

l  spmstard–Moduleto Eestimate Multiparametric Spatio Temporal AutoRegressive Regression SpatialDurbin Cross Sections Models

l  spmstar–Moduleto Estimate (m-STAR) Spatial Multiparametric Spatio Temporal AutoRegressiveRegression Models

l  spmstardh–Moduleto Estimate (m-STAR) Spatial Multiparametric Spatio Temporal AutoRegressiveRegression: Spatial Durbin Multiplicative 

Heteroscedasticity Cross SectionsModels

l  spmstarh–Moduleto Estimate (m-STAR) Spatial Multiparametric Spatio Temporal AutoRegressiveRegression: Spatial Lag Multiplicative Heteroscedasticity Cross Sections Models

l  sptobitmstar–Moduleto Estimate Tobit (m-STAR) Spatial Multiparametric Spatio TemporalAutoRegressive Regression: Spatial Lag Cross Sections Models

l  sptobitmstard–Moduleto Estimate Tobit (m-STAR) Spatial Multiparametric Spatio TemporalAutoRegressive Regression: Spatial Durbin Cross Sections Models

l  sptobitmstardh–Moduleto Estimate Tobit (m-STAR) Spatial Multiparametric Spatio TemporalAutoRegressive Regression: Spatial Durbin Multiplicative HeteroscedasticityCross Sections Models

l  sptobitmstarh–Moduleto Estimate Tobit (m-STAR) Spatial Multiparametric Spatio TemporalAutoRegressive Regression: Spatial Lag Multiplicative Heteroscedasticity CrossSections Models

l  sptobitsar–Moduleto Estimate Tobit MLE Spatial Lag Cross Sections Regression

l  sptobitsem–Moduleto Estimate Tobit MLE Spatial Error Cross Sections Regression

l  sptobitsdm–Moduleto Estimate Tobit MLE Spatial Durbin Cross Sections Regression

l  sptobitsac–Moduleto Estimate Tobit MLE Spatial Autocorrelation Cross Sections Regression

空间面板回归

l  xsmle –Stata modules to calculate spatial Panel Regression  [Author: Belotti et.al, 2014]

l  spglsxt–Moduleto estimate Spatial Panel Autoregressive Generalized Least Squares Regression

l  spregsdmxt:Maximum Likelihood Estimation Spatial Durbin Panel Regression [Author: Shehataet.al, 2014]

l  gs2slsarxt–Moduleto estimate Generalized Spatial Panel Autoregressive Two Stage Least SquaresRegression

l  gs2slsxt–Moduleto estimate Generalized Spatial Panel Autoregressive Two-Stage Least SquaresRegression

l  spgmmxt–Moduleto estimate Spatial Panel Autoregressive Generalized Method of MomentsRegression

l  spmstardhxt–Moduleto estimate (m-STAR) Spatial Multiparametric Spatio Temporal AutoRegressiveRegression: Spatial Durbin Multiplicative Heteroscedasticity Panel Models

l  spmstardxt–Moduleto Estimate (m-STAR) Spatial Multiparametric Spatio Temporal AutoRegressiveRegression: Spatial Durbin Panel Models

l  spmstarhxt–Moduleto Estimate (m-STAR) Spatial Multiparametric Spatio Temporal AutoRegressiveRegression: Spatial Lag Multiplicative Heteroscedasticity Panel Models

l  spmstarxt–Moduleto Estimate (m-STAR) Spatial Panel Multiparametric Spatio TemporalAutoRegressive Regression Models

l  spregdhp–Module to estimate Spatial PanelHan-Philips Linear Dynamic Regression: Lag & Durbin Models

l  spregdpd–Module to estimate Spatial PanelArellano-Bond Linear Dynamic Regression: Lag & Durbin Models

l  spregfext–Module to compute Spatial Panel FixedEffects Regression: Lag and Durbin Models

l  spreghetxt–Module to Estimate Spatial PanelRandom-Effects Multiplicative Heteroscedasticity Regression: Lag and DurbinModels

l  spregrext–Module to compute Spatial PanelRandom Effects Regression: Lag and Durbin Models

l  spregsacxt–Module to Estimate Maximum LikelihoodEstimation Spatial AutoCorrelation (SAC) Panel Regression

l  spregsarxt–Module to Estimate Maximum LikelihoodEstimation Spatial Lag Panel Regression

l  spregsdmxt–Module to Estimate Maximum LikelihoodEstimation Spatial Panel Durbin Regression

l  spregsemxt–Module to Estimate Maximum LikelihoodEstimation Spatial Error Panel Regression

l  Spregxt—New Stata Module Econometric Toolkitto Estimate Spatial Panel Regression Models

l  spxttobit–Moduleto estimate Tobit Spatial Panel Autoregressive 

广义最小二乘法GLS回归

l  sptobitmstardhxt–Moduleto Estimate Tobit (m-STAR) Spatial Multiparametric Spatio TemporalAutoRegressive Regression: Spatial Durbin Multiplicative HeteroscedasticityPanel Models

l sptobitmstardxt–Moduleto estimate Tobit (m-STAR) Spatial Multiparametric Spatio TemporalAutoRegressive Regression: Spatial Durbin Panel Models

l sptobitmstarhxt–Moduleto estimate Tobit (m-STAR) Spatial Multiparametric Spatio TemporalAutoRegressive Regression: Spatial Lag Multiplicative Heteroscedasticity PanelModels

l sptobitmstarxt–Moduleto estimate Tobit (m-STAR) Spatial Multiparametric Spatio TemporalAutoRegressive Regression: Spatial Lag Panel Models

l sptobitsemxt–Moduleto estimate Tobit MLE Spatial Error Panel Regression

l sptobitsacxt–Moduleto estimate Tobit MLE Spatial AutoCorrelation (SAC) Panel Regression

l sptobitsarxt– Module to estimate Tobit MLE Spatial Lag Panel Regression

l sptobitsdmxt–Moduleto estimate Tobit MLE Spatial Panel Durbin Regression

其他程序

l china_spatdwm–Moduleto provide spatial distance matrices for Chinese provinces and cities

l usswm–Moduleto provide US state and county spatial weight (contiguity) matrices

l  spmap–Moduleto visualize spatial data

l  spseudor2–Module to calculate goodness-of-fit measures in spatial autoregressive models

l  spagg–Moduleto create aggregate source or target contagion spatial effect variable fordirected dyadic data

l  spspc–Module to create specific source or target contagion spatial effect variablefor directed dyadic data

l  spdir–Moduleto create directed dyad contagion spatial effect variable

l  spundir–Moduleto create directed dyad contagion spatial effect variable

l  spmon–Moduleto create spatial effect variable for monadic data

l  spgrid–Moduleto generate two-dimensional grids for spatial data analysis

l  spkde -Moduleto perform kernel estimation of density and intensity functions fortwo-dimensional spatial point patterns

5)SAS代码资源:

The SPATIALREGProcedure:

https://support.sas.com/rnd/app/ … ets_spatialreg.html

6) 相关论坛

Github: https://github.com/

如果对空间计量感兴趣且有一些专业基础知识,欢迎到空间计量研究小组交流访问(文后“阅读原文”)。

可以到计量经济圈社群进一步访问交流各种学术问题,这年头,我们不能强调一个人的英雄主义,需要多多汲取他人的经验教训来让自己少走弯路。

计量经济圈当前有几个阵地,他们分别是如下4个matrix:

①小鹅社群:数据软件书籍等所有资料(最多且更新频繁),

②微信群:服务于计量经济圈社群群友(最活跃),

③研究小组:因果推断, 空间计量, 面板数据(最专业),

④QQ群:2000人大群服务于社群群友(最大)。

计量经济圈是中国计量第一大社区,我们致力于推动中国计量理论和实证技能的提升,圈子以海内外高校研究生和教师为主。计量经济圈绝对六多精神:社科资料最多、社科数据最多、科研牛人最多、海外名校最多、热情互助最多、前沿趋势最多如果你热爱计量并希望长见识,那欢迎你加入到咱们这个大家庭(戳这里),要不然你只能去其他那些Open access圈子了。注意:进去之后一定要看小鹅社群“群公告”,不然接收不了群息,也不知道怎么进入咱们独一无二的微信群和QQ群在规则框架下社群交流讨论无时间限制。

只有进去之后才能够看见这个群公告


# 有几个  # 经验教训  # 有一个  # 一定要看  # 具体操作  # 将给  # 小二  # 海内外  # 二位  # 才能够  # 不知道怎么  # 欢迎你  # 空间计量软件代码资源集锦(Matlab/R/Python/SAS/Stata)  # 走弯路  # 放在  # 如果你  # 同济大学  # 中国  # 服务于  # 感兴趣  # 最多  # 软件教程  # 不再因空间效应而感到孤独 


相关文章: 不看任何新闻资讯类app就对了  超好看!热门短剧丨大结局《娶了狂妃后,本王人间历凡尘》全集在线看  年轻人新闻消费研究:资讯APP丢一边,社交媒体放心间 | 路透报告  「新年免费插件大礼包」用这三款免费插件开启你2026的音乐之路吧  覃超:Facebook iOS App技术演化十年之路  逆袭!短剧【疾驰人生】完整版  GitHub左右为难!软件侵权,但开源代码合法,责任由谁来负?  热门短剧《摄像头下的秘密》完整版1-68集(大结局/合集/宋维后续)  短剧《妈咪别逃了!你和傅总是一对》完整版  热门短剧《周周爱》1-72(完整版/后续/大结局)  热门短剧《真少爷竟是蜥蜴人》完整版  2026年app推广拉新平台一手渠道实战评测:这5个平台真能赚到钱,每天200+  短剧《红鸾引》全集/完整版/大结局  不会编程如何下载AOI数据,用这个免费插件就够啦  【软件插件】SketchUP插件-ENS灯光插件V3.0安装教程及下载  AE PR插件合集  超好看!热门短剧丨大结局《|美女|别倒贴我不做裙下之臣》全集在线看  ChatGPT推出插件功能,对苹果App Store造成威胁?  PHPSiYU同|城源码开源  源码分享:通达信最美“筹码双龙”战法,紫色抄底金条追涨,太准了  软件资讯 | Microsoft 365 应用将取代 Office 应用,成为体验微软服务的新中心  2025年轻人App使用白皮书-后浪研究所  这款APP,细思极恐!  推荐6款免费听歌app,全网无损音乐免费听(附App+网站)!  超好看!热门短剧丨大结局《权臣的软肋》全集在线看  即时聊天咨询 我爱我家APP推出找房新功能“爱聊”  插件S8Edge:一秒将iPhone屏幕变成S8  热门短剧《他过分撩野》1-80(完整版/后续/大结局)  【全民反诈】国家反诈中心App上线新功能——鉴别AI“火眼金睛”  【虎强精选】日薪5000招短剧 “爸妈演员”?小心!冲养老钱来的  【微资讯】央视紧急曝光!这些山寨APP快删,危险  快手,快影 iOS App反调试  iOS APP图标版本化  扫烟盒二维码赚钱秘籍大公开!多款热门软件助你轻松开启绿色收益!  短剧《红鸾引》完整版1-92集(后续/大结局/合集)  拉听力就用这款宝藏APP  热门短剧《国民老公带回家》完整版1-81集/大结局/合集  软件资讯│Rhino 6 SR9 新增 Grasshopper 教学中文化  【粉笔精选热点】规范微短剧发展 让小作品有大意义  美团猫眼APP特惠19.9元起 | 《用武之地》超前点映,直击战争的残酷!  小 K 龙公文排版:免费插件,适配 Word/WPS 高效排公文  热门短剧《下嫁契约》完整版1-60集/大结局/合集  chrome必装插件之油猴(建议收藏)  iOS 14软件代码还曝光了一系列新品  卸载了这个App后,我才夺回了对生活的掌控权  VSCode必装插件清单:这10款让你效率翻倍,告别选择困难!  iOS14发布后,这些App被苹果逼疯了  上海大众汽车软件升级措施代码汇总  苹果追剧不用等!这款 iOS 专属 APP:4K 高清 + 全题材免费,手慢下架  Photoshop超强彩色图像转换黑白插件:BWStyler V2.0免费版下载与安装教程 


相关栏目: 【 网络营销44070 】 【 网络推广122852 】 【 网络优化116010 】 【 网址导航102054 】 【 网络技术82194 】 【 网络资讯43554