Announcement

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

  • Diff in diff with spatial analysis

    Dear all,

    This is the first time I post on this forum but I have been browsing it extensively by the past and it has been of great help, so first of all, I wanted to thank the community for the great help.

    I am currently writing a paper and trying to study the causal effect of public transport expansion on labor informality at neighborhoud level in the city of Medellin (Colombia) using 2008-2015 surveys. I elaborated two models, each one being based on difference in differences methodology. However, for each one, I am facing two obstacles/questions I cannot answer and was hoping someone could help me.

    1) Let's start with the easiest question. My first model is a logit diff in diff model, where I use data at individual level. The dependent variable is occupancy status (Formal / Informal job) and the main independent variable is the interaction between Post and Treatment (as usual for DID). My idea with this model is to evaluate the impact depending on individuals' characteristics. The problem here is the following: the Treatment variable was based on the neighborhood variable and therefore I attributed treatment to all individuals living in the treated neighborhoods. However, considering that those surveys do not use the same sample for each year, those are not necessarily the same people that were interviewed at year=0 and year=1. Therefore this is not panel data where we would have the repeated values for the same individual over several years. Is this a problem for my diff in diff estimation ?

    Here is the code I used:
    logit Formal T##post Edu Estrato i.Afi i.Tiempo i.Comuna Edad, cluster(Barrio)
    margins T, dydx(post) pwcompare

    2) The more tricky (but hopefully shorter question). I ran a second DID model by aggregating informality rates at neighborhood level which allowed me to have balanced panel data and ran a linear regression model. In this configuration, the coefficient of the interaction variable is positive and significant, highlighting a 2.7% decrease in informality rate. However, this could be the result of two different dynamics: a) the fact that people actually formalized b) the fact that informal workers moved to other neighborhoods due to rising prices. I was wondering if some spatial technique would allow me to control for the reallocation/sorting of workers?

    Here is the code I used:
    xtset Barrio2 Ao
    xtreg Formality T##Post Skill, fe cluster(Barrio2)

    All other suggestions are also very welcome as I'm still iterating.
    Thanks in advance
Working...
X