Dear all,
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.
I have firm-level dataset counting 2007 firms. Hence my 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
1 354
2 384
3 135
4 274
5 274
...
2007 354
spmat contiguity industry using "filedirectory", id(industry)
"industry values must be unique"
I hope someone could help me with this.
Thank you.
Mina
Comment