use spatialdata_province.dta,clear
spwmatrix gecon x_c y_c, wn(province) wtype(invecon) cart econvar(GDP_2000) rowstand xport(spatialdata_province,txt) replace\\由于选择的是 invecon(经济反距离矩阵)因此需要声明相应的经济变量
spmat import spatialweight_province using spatialdata_province.txt,replace //生成以spatialweight_province 为名称的 spmat 权重文件
楼主本文命令如下:
spwmatrix gecon Y X , wn(econ) wtype(invecon) econvar( GDPmean )
自动输出结果:
Inverse economic distance spatial weights matrix (91 x 91) calculated successfully and the following action(s) taken:
- Spatial weights matrix created as Stata object(s): econ.
查看生成的矩阵
全是0
求问为什么会这样?是命令用的不对吗?


雷达卡








京公网安备 11010802022788号







