1.输入命令:findit spatreg,在帮助文档上找到sg162 from http://www.stata.com/stb/stb60,安装sg162
2.查阅帮助文档:https://stats.idre.ucla.edu/stata/faq/how-can-i-calculate-morans-i-in-stata/
3.具体代码:help spatreg
- 知道经纬度:
use https://stats.idre.ucla.edu/stat/stata/faq/ozone.dta, clear #示例数据
spatwmat, name(ozoneweights) xcoord(lon) ycoord(lat) band(0 3)
spatgsa av8top, weights(ozoneweights) moran
- 不知道经纬度,直接知道空间权重
use "C:\Users\Administrator\Desktop\1901195-320-变量计算\moran.dta"
spatgsa av8top, weights(aweights) moran



雷达卡



京公网安备 11010802022788号







