Quantcast
Channel: Statalist
Viewing all articles
Browse latest Browse all 72799

spatial weight matrix (measuring technological proximity) created using industry variables?

$
0
0

Dear all,

I would like to create a spatial weight matrix measuring technological proximity. In other words, I would like to construct a matrix whose elements are equal to 1 if two firms belong to the same industry, otherwise 0. In addition, diagonal elements would need to be set to zero (in other words, a firm cannot be a technological "neighbor" to itself)

I have firm-level dataset counting 2007 firms. Hence my spatial weight matrix should be of 2007 x 2007 size. My industry level variable is a three digit variable, which looks like this..

Firm industry
1 354
2 384
3 135
4 274
5 274
...
2007 354
I tried using spmat command :
spmat contiguity industry using "filedirectory", id(industry)
However the message I get is

"industry values must be unique"
This is probably because spmat is created to measure geographical distance of objects(firms) being located in onedifferent location. so id, in such case, differs from one observations to another (which is not the case here, as some firms belong to the same industry). I am also not sure whether a contiguity is a right command here, as it addresses to firms sharing common geographical border. My spatial weight matrix should measure technological proximity instead.

Maybe a loop function needs to be used, which I struggle creating?

I hope someone could help me with this.

Thank you.

Mina

Viewing all articles
Browse latest Browse all 72799

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>