Announcement

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

  • Distance to Border Variable (for Spacial RDD)

    Hello Everyone!

    I am trying to create a variable corresponding to the distance from each municipality to a border (which includes a group of municipalities).

    However, I do not know how to create a border polygon using stata.

    I ran to get the coordinates dataset.
    Code:
    shp2dta using data12, database(CountryMap) coordinates(municoord) genid(identi)
    And then I attempted to create the polygon corresponding to my "treatment" area:

    Code:
    rename FID _ID
    
    mergepoly if inlist(province,"a","b","c", "d", ///
    "e", "f", "g", "h") using "municoord.dta", coor(merged_coord) replace
    
    mergepoly if inlist(muni_name,"m1", "m2", "m3", ///
    "m4", "m5", "m6", "m7","m8") using "municoord.dta", coor(merged_coord2) replace
    I manually merged the two datasets created by mergepoly.

    However, now I do not know how to create a variable corresponding to the distance between each municipality and the border of the polygon I created.

    Thank you very much.

    Best,
    Cat

  • #2
    https://www.statalist.org/forums/for...nt-to-a-border

    Comment


    • #3
      Thank you Jared. I was actually reading through the link you sent (and also this example), but I still can't understand if I created the "treatment" polygon correctly, and how to create the distance between the polygon's border and each municipality...

      Comment


      • #4
        May I just write a follow up question: can spatial RDDs have two non-contiguous “treatment” areas? For example, a treated area including provinces in the north of a country, and a treated area including provinces in the south of a country?

        Thank you very much!

        Cat

        Comment


        • #5
          Yeah it can. Say we have Cobb county Georgia as treated and Coweta County Georgia as treated. We can still do spatial RDD since we're estimating the LATE with respect to other houses/areas within some cutoff from the border... at least, I'm pretty sure this is true

          Comment


          • #6
            Dear Jared,
            Thank you so much! This was really helpful.

            Best,
            Cat

            Comment

            Working...
            X