Announcement

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

  • Spatial Correlation in Standard Errors

    Hi all, I would like to implement Conley standard errors to allow for spatial correlation, but I'm not sure which code is most appropriate.

    My data is repreated cross-sections, and I'm implementing a Difference-in-Difference design, by birth-year cohort and a continuous measure of worm infection:

    Y = Infection + Years of treatment + Infection*Years of treatment + Birth-year fixed effects + State fixed effects + Survey round fixed effects

    Each cross-section has outcome data recorded at the individual level, and data at the survey cluster level (i.e. about 30 households). These clusters change for each survey round, so I'm not sure if I can use standard errors clustered at the survey cluster level. However, I have each survey cluster's latitude/longitude, so I was hoping to utilise this to use Conley standard errors.

    I tried ols_cluster_hac but I don't think it is appropriate. My data is not really a panel (Each individual only appears once. The survey clusters don't appear in every survey round, although they would appear in every birth-year). Also, it does not let me include factor variables for the fixed effects.

    Does anyone know of a good way to deal with this type of data? One option might be to cluster at the survey cluster level. However, is this a problem if the survey clusters are not repeated in each survey round? (In contrast, each state appears in each survey round.)

    Thank you kindly for your advice,

    Lucas

  • #2
    You can use the user written command ols_spatial_HAC from this website:
    http://www.fight-entropy.com/2010/06...t-ols-for.html

    If your fixed effects dimension is too large, there is another user written code that partials out the fixed effects before using the above. the command is reg2hdfespatial and can be found here:
    http://www.trfetzer.com/conley-spati...fixed-effects/

    If you have weights in your data use this:
    https://github.com/Ramin001/reg2hdfespatial

    please note that per authors remark, you need to cite Solomon's paper if you use this commands.

    Comment


    • #3
      Hi Ramin,
      I know this is a rather old post. I have been trying to download these user-written commands, but I could not make it work... Would you have any suggestions about how to do so?
      Thank you.

      Comment

      Working...
      X