Command reference
All nwcommands commands, grouped as in help nwtopical.
Concepts
netexamplenetexp— Network expression and functionnetlistnetnamenewnetnamenodeid
Import/Export
nw2fromedge— Import two-mode network data from edgelistnw2set— Declare data to be two-mode network datanw2toedge— Convert two-mode network to edgelistnwappend— Append network datasetnwexport— Export network as Pajek or Ucinet filenwfromedge— Imports network data from edgelistnwimport— Import networknwsave— Save network data in filenwset— Declare data to be network datanwtoedge— Convert network to edgelistnwuse— Load Stata network datasetnwwebuse— Load network data over the web
Generators
nwbridges— Calculate bridgesnwdissimilar— Generate node dissimilaritiesnwduplicate— Duplicate a networknwdyadprob— Generate a network based on tie probabilitiesnwexpand— Expand variable to networknwgen— Network extensions to generatenwgenerate— Network extensions to generatenwgenvar— Network extensions to generatenwgeodesic— Calculate shortest paths betweennwhomophily— Generate a homophily networknwlattice— Generate a lattice networknwpath— Calculate paths between nodesnwpermute— Generate permutation of a networknwpref— Generate a preferential-attachment networknwrandom— Generate a random networknwreach— Calculate reachability networknwring— Generate a ring-lattice networknwsimilar— Generate node similaritiesnwsmall— Generate a small-world networknwsubset— Subset the nodes of a networknwtranspose— Transpose a network
Information
nwcurrent— Report and set current networknwdyads— Dyad censusnwissymmetric— Check if network is symmetricnwmotifs— 4-node undirected motif/graphlet censusnwname— Obtain and change meta-information of a networknwsummarize— Summarize a networknwtabulate— One-way table of dyadsnwtriads— Triad census of the network
Manipulation
nw2project— One-mode projection of a two-mode networknwaddnodes— Add nodes to networknwattime— Static graph view of a temporal network at a given timenwcollapse— Collapse a networknwdichotomize— Dichotomize a network at a threshold (built on nwrecode)nwdrop— Drop networks or network nodesnwdropnodes— Drop nodes from a networknwkeep— Keep a network (or only certain nodes)nwkeepnodes— Keep nodes of a networknwname— Obtain and change meta-information of a networknwnoderename— Rename a single node in a networknwpreserve— Preserve and restore network datanwproject— One-mode projection of a two-mode network (alias for nw2project)nwrecode— Recode networknwrename— Rename a networknwreplace— Replace networknwreplacemat— Replace network with Stata or Mata matrixnwrestore— Restore network data previously preservednwsubset— Subset the nodes of a networknwsym— Symmetrize networknwsymmetrize— Symmetrize network (alias for nwsym)nwtranspose— Transpose a network
Analysis
Centrality
nw2degree— Two-mode (bipartite) degree centralitynwbetween— Calculate betweenness centralitynwcentrality— Node centrality measuresnwcloseness— Calculate closeness centralitynwdegree— Degree centrality and distributionnwevcent— Calculate eigenvector centralitynwinduced— Induced, endogenous and exogenous centralitynwkatz— Calculate a Katz-inspired distance-decay centralitynwpagerank— PageRank centrality
Cohesion, Components & Subgroups
nwbridges— Calculate bridgesnwclique— Maximal clique enumerationnwcomponents— Calculate network components / largest componentnwkcomponents— Maximal k-component enumerationnwkcore— k-core decompositionnwkplex— Maximal k-plex enumerationnwnclan— Maximal n-clan enumerationnwnclique— Maximal n-clique enumerationnwsimmelian— Calculate Simmelian ties
Community Detection
nwcommunity— Detect communities via the Louvain method or label propagationnwmodularity— Score an existing node partition using Newman’s modularitynwspectral— Graph Laplacian spectral analysis
Positions, Roles & Equivalence
nw2clustering— Clustering coefficient (transitivity) of a two-mode networknwassortativity— Newman’s assortativity coefficientnwbalance— Structural balance of a signed networknwbrokerage— Gould-Fernandez brokerage rolesnwburt— Calculate Burt structural hole measuresnwclustering— Clustering coefficient (transitivity) of a networknwconcor— CONCOR structural-equivalence blockmodelnwconstraint— Calculate Burt’s constraintnwcoreperiphery— Discrete core-periphery detectionnwdissimilar— Generate node dissimilaritiesnwfactions— Partition nodes into a specified number of cohesive factionsnwhierarchy— Hierarchical clustering of nodes (role/position analysis)nwlambda— Edge (line) connectivity matrix between all node pairsnwmatching— Maximum-cardinality bipartite matchingnwmixing— E-I index and mixing table for a categorical node attributenwshared— Calculate number of shared neighbors between nodes and saves information in networknwsimilar— Generate node similaritiesnwsimindex— Common-neighbor similarity indices between all node pairs
Paths, Reachability & Ego Networks
nwaltergen— Generate a variable from alter/neighbor attributesnwego— Ego-network size and densitynwgeodesic— Calculate shortest paths betweennwmaxflow— Maximum flow and minimum cut between two nodesnwneighbor— Extract the network neighbors of a nodenwpath— Calculate paths between nodesnwrandomwalk— Mean random-walk hitting time to a target nodenwreach— Calculate reachability network
Statistical Estimation of Networks
nwcorrelate— Correlate networks and variablesnwcug— Conditional Uniform Graph (CUG) testnwergm— Exponential-family random graph model (ERGM) estimationnwqap— Multivariate QAP regressionnwsaom— Stochastic actor-oriented model (SAOM) estimation between observed network wavesnwutility— Calculate utility scores according to Jackson and Wollinsky (1996)
Other Analysis Utilities
nwcontext— Create a context variablenwgen— Network extensions to generatenwgenerate— Network extensions to generatenwgenvar— Network extensions to generatenwnode— Checks if node exists in a networknwturnover— Tie turnover/stability between two waves of the same networknwvalue— Returns a tie value
Dynamic & Event-Based Models
nwdynam— Dynamic Network Actor Model - choice, rate, and choice_coordination sub-models (MLE)nwrem— Relational event model (ordinal partial likelihood, MLE)
Utility Commands
nwds— List loaded networks, in the style of Stata’s ownds
Utilities
nwclear— Clear all networks and variables from memorynwcurrent— Report and set current networknwerrorcodes— What this package’s own custom return codes meannwinstall— Install Stata menu/dialogsnwload— Load a network as Stata variablesnwnetworktypes— How commands classify binary/directed/weighted/signed/two-mode networksnworder— Reorder networks in datasetnwsync— Sync network with Stata variablesnwtomata— Return adjacency matrix of networknwtomatafast— Return link to adjacency matrix of networknwtostata— Copy a Mata matrix into Stata variablesnwunab— Unabbreviate network listnwvalidate— Validate network namenwvalidvars— Validate Stata variables for network
Visualization
nwdendrogram— Plot a wheel dendrogramnwmovie— Interactive, animated network movie (panel waves or a relational-event timeline)nwmoviexy— Animate a sequence of networks (alias for nwmovie)nwplot— Plot a networknwplotmatrix— Plot a network as sociomatrix
Programming
nwcompressobs— Compresses observations in Stata
Uncategorized
nw_helpwriter— errno help file yetnw_resetrc— errno help file yetschemeinfo— errno help file yet-
unw_defs— errno help file yet _nwdatasync_nwnodeid_nwnodelab_nwtomataanimatenwalphabeticalnwcohesionnwcommandsnwergm_estatnwinternalsnwintronwprogrammingnwsaom_estatnwsaom_remarksnwstartnwtab1nwtab2nwtab3nwtopical