nwtopical
Contents
SectionDescription
- hline 50
- [NW-2.1]Concepts
- [NW-2.2]Import/Export
- [NW-2.3]Generators
- [NW-2.4]Information
- [NW-2.5]Manipulation
- [NW-2.6]Analysis
- [NW-2.6.1]Centrality
- [NW-2.6.2]Cohesion, components and subgroups
- [NW-2.6.3]Communities
- [NW-2.6.4]Positions, roles and similarity
- [NW-2.6.5]Clustering, mixing and balance
- [NW-2.6.6]Paths, flows and ego networks
- [NW-2.6.7]Statistical tests
- [NW-2.6.8]Other analysis tools
- [NW-2.7]Utilities
- [NW-2.8]Visualization
- [NW-2.9]Programming
- hline 24
- hline 3 Concepts
-
hline 24
- netexample — Example network data sets
- netexp — Network expression and function
- netlist — List of existing networks
- netname — Name of an existing network
- newnetname — Name of a new network
-
nodeid — Identification of nodes
- hline 27
- hline 3 Import/Export
-
hline 27
- nw2fromedge — Import two-mode network data from an edge list
- nw2set — Declare data to be two-mode network data
- nw2toedge — Convert a two-mode network to an edge list
- nwappend — Append a network dataset
- nwexport — Export a network as a Pajek, UCINET, GML or edge list file
- nwfromedge — Import network data from an edge list
- nwimport — Import a network from a Pajek, UCINET, GML or edge list file
- nwsave — Save network data in a file
- nwset — Declare data to be network data
- nwtoedge — Convert a network to an edge list
- nwuse — Load a Stata network dataset
-
nwwebuse — Load network data over the web
- hline 24
- hline 3 Generators
-
hline 24
- nwduplicate — Duplicate a network
- nwdyadprob — Generate a network based on tie probabilities
- nwexpand — Expand a variable to a network
- nwgen — Generate variables or networks with network functions (like egen)
- nwgenerate — Generate a network from a function or a network expression
- nwgenvar — Generate variables or networks with network functions (like egen)
- nwhomophily — Generate a homophily network
- nwlattice — Generate a lattice network
- nwpermute — Generate a permutation of a network
- nwpref — Generate a preferential-attachment network
- nwrandom — Generate a random network
- nwring — Generate a ring-lattice network
-
nwsmall — Generate a small-world network
- hline 25
- hline 3 Information
-
hline 25
- nwds — List the networks in memory (like ds)
- nwdyads — Dyad census
- nwissymmetric — Check whether a network is symmetric
- nwmotifs — 4-node undirected motif/graphlet census
- nwname — Obtain and change meta-information of a network
- nwsummarize — Summarize a network
- nwtabulate — One-way table of dyads
-
nwtriads — Triad census of a network
- hline 26
- hline 3 Manipulation
-
hline 26
- nw2project — One-mode projection of a two-mode network
- nwaddnodes — Add nodes to network
- nwattime — Static graph view of a temporal network at a given time
- nwcollapse — Collapse a network
- nwdichotomize — Dichotomize a network at a threshold
- nwdrop — Drop networks or nodes
- nwdropnodes — Drop nodes from a network
- nwkeep — Keep networks or nodes
- nwkeepnodes — Keep nodes of a network
- nwnoderename — Rename a single node in a network
- nwpreserve — Preserve and restore network data
- nwproject — One-mode projection of a two-mode network (alias for nw2project)
- nwrecode — Recode a network
- nwrename — Rename a network
- nwreplace — Replace a network
- nwreplacemat — Replace network with Stata or Mata matrix
- nwrestore — Restore network data previously preserved
- nwstack — Stack several networks into one block-diagonal network
- nwsubset — Subset the nodes of a network
- nwsym — Symmetrize a network
- nwsymmetrize — Symmetrize a network (alias for nwsym)
-
nwtranspose — Transpose a network
- hline 24
- hline 3 Analysis
-
hline 24
-
Centrality
- nw2degree — Two-mode (bipartite) degree centrality
- nwbetween — Betweenness centrality
- nwcentrality — Node centrality measures
- nwcloseness — Closeness centrality
- nwdegree — Degree centrality and distribution
- nwevcent — Eigenvector centrality
- nwinduced — Induced, endogenous and exogenous centrality
- nwkatz — Katz-style distance-decay centrality
-
nwpagerank — PageRank centrality
-
Cohesion, components and subgroups
- nwbridges — Find bridges (ties whose removal disconnects the network)
- nwclique — Maximal clique enumeration
- nwcohesion — Moody-White structural cohesion hierarchy
- nwcomponents — Network components and the largest component
- nwkcomponents — Maximal k-component enumeration
- nwkcore — k-core decomposition
- nwkplex — Maximal k-plex enumeration
- nwnclan — Maximal n-clan enumeration
- nwnclique — Maximal n-clique enumeration
-
nwsimmelian — Simmelian ties
-
Communities
- nwcommunity — Detect communities via the Louvain method or label propagation
- nwmodularity — Score an existing node partition using Newman’s modularity
-
nwspectral — Graph Laplacian spectral analysis
-
Positions, roles and similarity
- nwbrokerage — Gould-Fernandez brokerage roles
- nwburt — Burt’s structural-hole measures
- nwconcor — CONCOR structural-equivalence blockmodel
- nwconstraint — Burt’s constraint
- nwcoreperiphery — Discrete core-periphery detection
- nwdissimilar — Generate node dissimilarities
- nwfactions — Partition nodes into a specified number of cohesive factions
- nwhierarchy — Hierarchical clustering of nodes (role/position analysis)
- nwregular — Classes of regularly equivalent nodes
- nwshared — Number of shared neighbors of all pairs of nodes, as a network
- nwsimilar — Generate node similarities
-
nwsimindex — Common-neighbor similarity indices between all node pairs
-
Clustering, mixing and balance
- nw2clustering — Clustering coefficient (transitivity) of a two-mode network
- nw2motifs — Bipartite motifs of a two-mode network
- nw2nested — Nestedness of a two-mode network: NODF and C-score
- nwassortativity — Newman’s assortativity coefficient
- nwbalance — Structural balance of a signed network
- nwclustering — Clustering coefficient (transitivity) of a network
-
nwmixing — E-I index and mixing table for a categorical node attribute
-
Paths, flows and ego networks
- nwaltergen — Generate a variable from alter/neighbor attributes
- nwego — Ego-network size and density
- nwgeodesic — Calculate shortest paths between nodes
- nwlambda — Edge (line) connectivity matrix between all node pairs
- nwmatching — Maximum-cardinality bipartite matching
- nwmaxflow — Maximum flow and minimum cut between two nodes
- nwneighbor — Extract the network neighbors of a node
- nwpath — Paths between nodes
- nwrandomwalk — Mean random-walk hitting time to a target node
-
nwreach — Reachability network
-
Statistical tests
- nwcorrelate — Correlate networks and variables
- nwcug — Conditional Uniform Graph (CUG) test
- nwqap — Multivariate QAP regression
-
nwutility — Utility scores of Jackson and Wolinsky (1996)
-
Other analysis tools
- nwcontext — Create a context variable
- nwnode — Check whether a node exists in a network
- nwturnover — Tie turnover/stability between two waves of the same network
-
nwvalue — Return a tie value
- hline 24
- hline 3 Utilities
-
hline 24
- nwapi — Mata functions to read networks
- nwclear — Clear all networks and variables from memory
- nwcurrent — Report and set current network
- nwerrorcodes — Return codes of nwcommands
- nwinstall — Install the dialogs, menus and the model packages
- nwload — Load a network as Stata variables
- nwnetworktypes — How commands classify binary/directed/weighted/signed/two-mode networks
- nworder — Reorder the networks in memory
-
nwversion — Version of nwcommands and of the installed model packages
- hline 27
- hline 3 Visualization
-
hline 27
- animate — Animate graphs
- nwdendrogram — Plot a wheel dendrogram
- nwegoplot — Draw the ego network of one node, ego in the center
- nwmovie — Interactive, animated network movie (panel waves or a relational-event timeline)
- nwmoviexy — Animate a sequence of networks (alias for nwmovie)
- nwplot — Plot a network
-
nwplotmatrix — Plot a network as sociomatrix
- hline 25
- hline 3 Programming
-
hline 25
- nwcompressobs — Drop observations that no network needs
- nwsync — Synchronize a network with Stata variables
- nwtomata — Return the adjacency matrix of a network
- nwtomatafast — Return a link to the adjacency matrix of a network
- nwtostata — Copy a Mata matrix into Stata variables
- nwunab — Unabbreviate network list
- nwvalidate — Validate a network name
-
nwvalidvars — Validate Stata variables for a network
- hline 52
- hline 3 Statistical models (separate packages)
- hline 52
The statistical network models are separate packages that need the core. Install them with nwinstall, models (see nwinstall; nwversion shows which are installed). Which package do you need? See browse “https://nwcommands.org/which-package/”.
- nwsaom — Stochastic actor-oriented models (SAOM): network and behavior dynamics between observed waves
- nwergm — Exponential random graph models (ERGM) for cross-sectional networks
- nwdynam — Dynamic network actor models (DyNAM): choice and rate models for event sequences
- nwrem — Relational event models (REM) for timed interaction events
nwcommands version 3.25.0, 14 November 2026 (check your installed version)