Announcement

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

  • Storing tabulated results in .dta (from spatlsa)

    Hi all,

    I'm using spatlsa to calculate local spatial autocorrelation measures, which gives me a value for every observation in my cross-sectional panel. I would now like to store them in a .dta-file to use them for mapping. Do you now how to do this? I've tried:
    Code:
    return matrix m1= r(Moran)
    non r-class program may not set r()
    r(151);
    and
    Code:
    . matrix mor1 =get(r(Moran))
    matrix r(Moran) not found
    r(111);
    This resulted in the error codes displayed. The last one is especially weird, because when I run return list, I get:
    Code:
    . return list
    matrices:
                  r(Moran) :  402 x 5
    Alternatively, spatlsa also has a built-in mapping function. But this just produces a blank graph when I use it with the map() option.
    So if anybody has an idea how to solve either issue, I would be very grateful.

    All the best,

    Tim Umbach
    Last edited by Tim Umbach; 22 Jun 2017, 07:37.

  • #2
    Nevermind, I've found the solution. This works for me (for some weird reason):
    Code:
    . matrix m1 =r(Moran)
    . svmat m1, names(matnames)
    I sometimes find the whole matrix and object system of STATA quite confusing.

    Comment

    Working...
    X