Announcement

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

  • Geodist Error

    Hello Statalisters,

    I'm facing an issue with the geodist command as in the screenshot below. I don't know what does this error means. Greatly appreciate your help.

    I have longitudes and latitudes of two different locations and I would like to create the distance between the nearest of these locations.


    Click image for larger version

Name:	geodist.png
Views:	1
Size:	54.4 KB
ID:	1722272

  • #2
    geodist is from SSC (FAQ Advice #12). The command expects numerical variables. Try

    Code:
    foreach var of varlist LONGITUDE LATITUDE longitude latitude{
        destring `var', replace
    }
    geodist LONGITUDE LATITUDE longitude latitude, gen(d)

    Comment


    • #3
      Thank you

      Comment

      Working...
      X