Announcement

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

  • How to create a dbf/gal file from a dta file? (spatmat command)

    Hello everybody!

    If I have a gal/dbf file of a contiguity matrix (created through geoda, e.g.), in order to create a spatial weight matrix in .dta extension, I use the command "spmat":

    spmat import myobj using filename.dbf, geoda
    spmat getmatrix myobj W
    getmata (x*)=W


    My question is: suppose vice versa that I have the .dta file of the contiguity matrix. I can I export a gal/dbf file from the .dta file? (basically, I want to do the opposite process).

    I tried with the command "export" of spatmat but I did not manage in doing such a thing.

    Many thanks to whoever would like to help me with this, and Merry Christmas to everybody!

    Kodi

  • #2
    The output of ssc describe spwmatrix suggests that the user-written spwmatrix command will do what you require. No guarantees from me - I don't do this sort of thing myself, I'm just lucky at guessing good terms for Stata's search command:
    Code:
    search geoda

    Comment


    • #3
      Thank you William!

      Comment

      Working...
      X