Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • -spmat- error with idistance "coordinate variables must be numeric"

    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 )
    Last edited by Gbenga Adejafe; 11 Nov 2015, 14:55.

  • #2
    Originally posted by tratt View Post
    This is probably posted in the wrong forum i realize now )
    That's right. Please ask in the General forum.

    Comment


    • #3
      Thanks, as soon as i figure out how to delete this one, since i guess there shouldn't be two same questions..

      Comment


      • #4
        Posts cannot be deleted but don't mind. Go ahead and ask again in the proper forum. However, I would recommend that you read the FAQ first, especially section 12, and revise your question based on the advice there.

        Comment

        Working...
        X