Command reference

All nwcommands commands, grouped as in help nwtopical.

nwsaom, nwergm, nwdynam and nwrem are not part of the core. They are separate GPL-3 packages with their own sections (see the menu); the entries below only point to them. The complete syntax is in each package’s own Stata help (help nwsaom etc.).

Concepts

  • 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

Import/Export

  • 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

Generators

  • 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

Information

  • 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

Manipulation

Analysis

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)
  • 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

Model packages (separate, GPL-3)

  • nwsaom — Stochastic actor-oriented models (SAOM) for network panels. Section: nwsaom
  • nwergm — Exponential random graph models (ERGM). Section: nwergm
  • nwdynam — Dynamic network actor models (DyNAM) for event data. Section: nwdynam
  • nwrem — Relational event models (REM) for event data. Section: nwrem

Utilities

  • 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

Visualization

  • animate — Animate graphs
  • nwdendrogram — Plot a wheel dendrogram
  • 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

Programming

  • 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

Uncategorized


Back to top

nwcommands is free software under the GNU General Public License, version 3, as are the model packages nwsaom, nwergm, nwdynam and nwrem. Citing and licenses · Get help · GitHub. Issues with the core go to the nwcommands repository; issues with a model package go to that package's own repository.

This site uses Just the Docs, a documentation theme for Jekyll.