Hello,
i couldn't find much about this by googling so hope someone can advise me here... I am trying to learn about spmat command, more precise how to make inverse distance matrix and i run into some issue with specific data that i am using. I use shp file (i couldn't attach it) that i created from FL_insurance_sample.csv that could be downloaded from the internet, so my guess is that something might be wrong with the shape file...Problem is that when i open and check dta files created with -shp2dta-, i do not see anything different than in other shp files that i have and do work. Thank you for any suggestion.... below are commands used
clear all
cd "C:\Users\...\Desktop\shape2stata manual\Insurance_US"
shp2dta using newshapefile, database(Ins_from_shp) coordinates(coor_from_shp) genid(id) replace
use Ins_from_shp, clear
spmat idistance idmat1 X Y, id(id) normalize(row)
Forgot to mention, creating contiguity matrix makes me no problems, so
spmat contiguity idmat_c2 using coor_from_shp, id(id)
spmat graph idmat_c2, name(mmax_contig)
these are working fine...
This is probably posted in the wrong forum i realize now
)
i couldn't find much about this by googling so hope someone can advise me here... I am trying to learn about spmat command, more precise how to make inverse distance matrix and i run into some issue with specific data that i am using. I use shp file (i couldn't attach it) that i created from FL_insurance_sample.csv that could be downloaded from the internet, so my guess is that something might be wrong with the shape file...Problem is that when i open and check dta files created with -shp2dta-, i do not see anything different than in other shp files that i have and do work. Thank you for any suggestion.... below are commands used
clear all
cd "C:\Users\...\Desktop\shape2stata manual\Insurance_US"
shp2dta using newshapefile, database(Ins_from_shp) coordinates(coor_from_shp) genid(id) replace
use Ins_from_shp, clear
spmat idistance idmat1 X Y, id(id) normalize(row)
Forgot to mention, creating contiguity matrix makes me no problems, so
spmat contiguity idmat_c2 using coor_from_shp, id(id)
spmat graph idmat_c2, name(mmax_contig)
these are working fine...
This is probably posted in the wrong forum i realize now

Comment