Hello, everyone. I am on my spatial research right now for my undergraduate thesis. I have a shp file (_ID, _CX, _CY) that contains an Island with 10 provinces within it, and I have made shp file to dta file. I also merge it with my panel data that consist 10 unit (10 provinces) with the lenght of period from 2014-2023 (10 years). When I need to test the spatial autocorrelation, I create the contiguity matrix first using the command below:
spmat contiguity Wcon using "Wilayah_Sumatera.dta" if Tahun == 2014, id(_ID) norm(row)
But the creation is failed and Stata said "variable _X not found" after I ran the command. Is there anyone can help me to solve this problem?
I really need to use the "spmat" command so I can use "spatdiag, weights(W)" command instead of "estat moran" for the spatial autocorrelation test.
Thanks.
Ary Pratama
spmat contiguity Wcon using "Wilayah_Sumatera.dta" if Tahun == 2014, id(_ID) norm(row)
But the creation is failed and Stata said "variable _X not found" after I ran the command. Is there anyone can help me to solve this problem?
I really need to use the "spmat" command so I can use "spatdiag, weights(W)" command instead of "estat moran" for the spatial autocorrelation test.
Thanks.
Ary Pratama
Comment