宋啸天 发表于 2019-5-22 11:08 
你可以参考以下步骤:
infile v2-v32 using ww.txt, clear // ww.txt是我的权重矩阵,维数31×31,v2-v ...
你好,我用你的程序做了好几遍,但每次建立的矩阵都是错误的。我要建立的是3680*3680矩阵,但结果都是3680*3910矩阵,不知道该怎样修改,希望能得到你的帮助,非常感谢!
现附上我的程序:
spatwmat using "D:\产业集聚\excel\distance matrix.dta",name(w)
The following matrix has been created:
1. Imported non-binary weights matrix w
Dimension: 230x230
. set matsize 3680
. mat TMAT=I(16)
. mat Wxt=TMAT#w
. svmat Wxt
number of observations will be reset to 3680
Press any key to continue, or Break to abort
number of observations (_N) was 230, now 3,680
. save Wxt.dta,replace
file Wxt.dta saved
. spatwmat using Wxt.dta,name(ww) s
matsize too small to create a [3680,3910] matrix