Announcement

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

  • Questions about spatial-temporal modeling in Stata

    My colleague Shanshan Wang and I are trying to figure out the best way forward to analyze some spatial-temporal data and was wondering if anyone could give us some advice/thoughts about spatial-temporal methods. We can't share any examples of the data due to privacy concerns, but are more trying to get some kind of idea about how we could/would approach the problem.

    Data -
    Crimes : This dataset includes a field with the date, time, and datetime; address; latitude; longitude; and type of crime
    Attendance : This dataset includes a student ID, latitude, longitude, date, a vector of demographics, school ID, and an indicator of whether or not the student attended school on a specific date.

    Goal -
    We are trying to estimate the relationship between the proximity to violent crime in the students' community and attendance. Put another way, we think that students who live closer to violent community crime would be less likely to attend school the following day than students who live further away.

    Challenge -
    One any given date there are multiple crimes, so merging the data prevents us from being able to -xtset- the dataset (e.g., repeated time values errors). I'm not familiar with spatial-temporal methods, but my intuition is that we likely need a way to adjust any estimates to account for the number of crimes and their proximity to the students. I would think that these types of things are fairly common in the world of spatial-temporal statistics and figured others on the StataList might have some suggestions for how to think about things or would be able to point us in the right direction to find the materials that we should be reading to better understand how to deal with these types of problems.


  • #2
    I'm no expert here myself, but I've known a number of criminologists who work on problems at least somewhat similar to this, particularly ones who work on so-called "hot spots." I think that some of that material might be relevant for you. Journal of Quantitative Criminology might be one place to look. My apologies if you've been through all this sort of stuff already. If you have, I'd find it interesting to get a sense of what might be lacking in that literature.

    Comment


    • #3
      I came across this post while searching for a method to analyze spatio-temporal data in Stata. I have been looking for commands in Stata to estimate models with spatial-temporal data, but I have not yet utilized them. For those who may be interested in this topic, I want to share three articles and one book that provide insights into the latest advancements. These resources offer both theoretical explanations and practical examples using empirical data. The first two articles specifically address the theory of causal inference with spatial-temporal data. The book also includes Stata code for calculating structural nested mean models, which could potentially be applied to your own data, although I have not personally tested them.


      References:
      Papadogeorgou, Georgia; Imai, Kosuke; Lyall, Jason; Li, Fan (2022): Causal Inference with Spatio-Temporal Data: Estimating the Effects of Airstrikes on Insurgent Violence in Iraq. In Journal of the Royal Statistical Society Series B: Statistical Methodology 84 (5), pp. 1969–1999. DOI: 10.1111/rssb.12548.
      Blackwell, Matthew; Glynn, Adam N. (2018): How to Make Causal Inferences with Time-Series Cross-Sectional Data under Selection on Observables. In American Political Science Review 112 (4), pp. 1067–1082. DOI: 10.1017/S0003055418000357.
      Christiansen, Rune; Baumann, Matthias; Kuemmerle, Tobias; Mahecha, Miguel D.; Peters, Jonas (2022): Toward Causal Inference for Spatio-Temporal Data: Conflict and Forest Loss in Colombia. In Journal of the American Statistical Association 117 (538), pp. 591–601. DOI: 10.1080/01621459.2021.2013241.
      Hernán, M. A.; Robins, J. M. (2020): Causal Inference: What If. Boca Raton: Chapman & Hall/CRC.
      Last edited by Felix Kaysers; 11 Jul 2023, 06:41. Reason: Copy-editing
      __________________________________________________ __________

      Cheers, Felix
      Stata Version: MP 18.0
      OS: Windows 11

      Comment


      • #4
        It seems that all articles can be traced back to the gformula by Robins and a Stata package exists:
        Daniel, Rhian M.; Stavola, Bianca L. de; Cousens, Simon N. (2011): Gformula: Estimating Causal Effects in the Presence of Time-Varying Confounding or Mediation using the G-Computation Formula. In The Stata Journal 11 (4), pp. 479–517. DOI: 10.1177/1536867X1201100401.
        __________________________________________________ __________

        Cheers, Felix
        Stata Version: MP 18.0
        OS: Windows 11

        Comment

        Working...
        X