Seb
Seb

Reputation: 165

Efficient Way To Create Adjacency Matrix in Stata?

I have data that looks like this in Stata:

Cat#1    Cat#2
  A        X
  B        X
  A        Y
  C        Z
 ...      ...

I want to create an adjacency that I will later output to Matlab for further analysis.

Here is my proposed way of doing it:

The problem is that I have a lot of unique categories for Cat#2, so I think that coding up this part would take a long time. Are there any suggestions on what I can do to speed up the process of creating the sought data structure?

Thanks!

Upvotes: 1

Views: 952

Answers (1)

BLC
BLC

Reputation: 11

There are a few Stata commands for making adjacency matrices.

Try typing findit netsis or findit nwcommands at the command prompt.

Upvotes: 1

Related Questions