I'm looking to estimate a spatial panel model in STATA, however, I'm running into difficulties creating a spatial weight matrix. For note my N=66 while my T=25.

I'm a novice when it comes to utilising spatial econometric methods. However, I wonder could I use QGIS to create a spatial weight matrix? I have longitude and latitude data which provides coordinates of countries. Is it possible to create a binary weight matrix to indicate if 1 if any region 1..66 shares a border and 0 if they do not? Obviously this will not change over time.

I would like to then export this matrix into a csv file and upload it to STATA. Sorry if any of my terminology is off as I'm a novice when it comes to these methods.

Any help is most welcome!

  • it sounds like you want an adjacency matrix not distance – Ian Turton Feb 1 '16 at 14:03
  • Hi Ian! I wonder is it's not too much trouble would you be able to discuss both. From the paper I'm basing my estimation on they utilise a contiguity-based binary weight matrix to represent interaction across regions. To you does this sound like an adjacency matrix? – Sean O'C Feb 1 '16 at 14:09

This is probably a little late for you, but a few thoughts:

First, I am guessing you probably just did this by hand, as it wouldn´t be too difficult to look at a map and create your variable.

Second, if you are working in STATA, you might want to check out the spwmatrix module to create spatial weights within STATA. If you can avoid going back and forth between different programs, that´s probably for the best.

Third, I am not an expert with QGIS, but if you are looking for a quick-and-easy way to create a spatial weights matrix, I would recommend checking out GeoDa. http://geodacenter.github.io/index.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.