Announcement

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

  • Geonear question

    Hello,
    I was wondering if someone can help me with calculating couple of spatial lag variables using distance. I have county latitudes, longitudes, and personal income. I want to calculate spatial lag variables for personal income using different distances. More specifically, personal income within 100 miles of a county centroid, personal income within 100-200 miles, 200-300 miles, etc. Is this something I can do using geonear? If not is there another program? Thank you so much.
    Anil
    Last edited by Anil Rup; 06 Sep 2016, 11:21.

  • #2
    Anil,

    If I understand your question correctly, I believe that geonear can do what you are asking for. It may be a bit cumbersome, but I don't know of any other alternatives. What you need to do is create two files, one with a list of counties and one with a list of records containing the individuals and their incomes. Then you would do something like this:

    Code:
    geonear baseid baselat baselon using nborfile , neighbors(nborid nborlat nborlon) long within(#)
    where:
    • baseid contains the ID number of each county in the county file
    • baselat contains the latitude of each county in the county file
    • baselon contains the longitude of each county in the count file
    • nborid contains the county ID number for each record in the personal file
    • nborlat contains the county latitude for each record in the personal file
    • nborlon contains the county longitude for each record in the personal file
    • # is the radius you are interested in
    You will probably need to run the command several times to get the various radii you are interested in.

    NB: I have used geonear but not for this purpose, so I can't promise that it will do exactly what you want.

    Regards,
    Joe

    Comment


    • #3
      Joe,
      Thank you for the quickie. I am sorry I did not make my case clear enough. Personal income is also a county-level variable (county total personal income). I was able to do this for within 100 miles, within 200 miles, etc using spgen program. What I want is for the second variable for counties within 100-200 miles range (excluding first 100). It looks like long within option requires a single number specified. Thanks again.
      Anil

      Comment


      • #4
        The counties within 100-200 miles are just those within 200 miles minus those within 100 miles. I guess this is the kind of manipulation that Joe is hinting at.

        It seems that a county is to be included in its entirety if and only if its centroid satisfies a distance definition. So, you're ignoring the question of what fraction of a county area is concerned and in turn what fraction of its income is concerned. I don't blame anyone for doing this, but I trust the roughness is visible here.

        A GIS might well be the better vehicle for this, notwithstanding the excellence of geonear (SSC).

        But, but, but, and I have a geographer persona too: What possible analysis makes these arbitrary zones the preferred framework for analysis? Why not just use distances neat without the binning?

        Comment


        • #5
          Yes, the variable is a proxy (hence the roughness) for market potential. I am looking at the effect of this on firm relocation. By calculating this geographic variable, I am trying to calculate the size of the local market in a county including counties in surrounding areas. By increasing the range, I am trying to expand this area and see how the results changes. Thanks.

          Comment


          • #6
            Anil,

            Nick is correct; I was assuming that you would find, for example. firms within 100 miles and firms within 200 miles in order to derive a list of those within 100-200 miles. Sorry that I did not make that more explicit.

            Regards,
            Joe

            Comment

            Working...
            X