»  Home »  Stata News »  Vol 33 No 1 »  User's corner

## User's corner: Network analysis made easy

Network analysis is popular across many disciplines. In social sciences, relationships among individuals form networks. In epidemiology and public health, network analysis can identify how health behaviors or diseases are distributed across a network and even identify important individuals to target when implementing an intervention. In business management, networks expose relationships among board members of firms.

You probably already knew that. But did you know that you can perform network analysis using Stata?

The nwcommands package by Thomas Grund is an entire suite of commands for importing and manipulating networks, generating networks, calculating centrality and dissimilarity measures, visualizing networks, and more.

Many commands in the nwcommands package have syntax similar to Stata commands, making learning and using Grund's commands easy. For instance, to use a dataset in Stata, you would type

use datasetname

To use network data using nwcommands, you would type

nwuse networkname

If you are familiar with drop, keep, collapse, and recode, you will feel comfortable with nwdrop, nwkeep, nwcollapse, and nwrecode. In case you prefer not to use commands at all, Grund also provides dialog boxes so that you can point and click through your network analysis.

Beyond providing the nwcommands package, Grund also hosts nwcommands.org, a site devoted to his network analysis commands. The site includes tutorials, slides, videos, and even a forum to get you up and running. Check out a few examples of the network graphs and movies you can create.

Visit nwcommands.org.