xsmle tl u r, re model(sdm) wmat(E:\temporary file\stata临时数据\weight.dta)
Only one spatial weighting matrix E:\temporary file\stata临时数据\weight.dta is allowed
invalid syntax
r(198);
use weight.dta, clear
spmat dta W w*, id(id) normalize(row)
spmat save W using W.spmat
spmat use W using "W.spmat"
//w是你weight.dta文件中的变量名的第一个字母,比如你的变量名是V1,V2,V3等
wmat()括号里的要是存储在内存里的,最后一行的W