Command reference

All nwcommands commands, grouped as in help nwtopical.

Concepts

Import/Export

  • nw2fromedge — Import two-mode network data from edgelist
  • nw2set — Declare data to be two-mode network data
  • nw2toedge — Convert two-mode network to edgelist
  • nwappend — Append network dataset
  • nwexport — Export network as Pajek or Ucinet file
  • nwfromedge — Imports network data from edgelist
  • nwimport — Import network
  • nwsave — Save network data in file
  • nwset — Declare data to be network data
  • nwtoedge — Convert network to edgelist
  • nwuse — Load Stata network dataset
  • nwwebuse — Load network data over the web

Generators

  • nwbridges — Calculate bridges
  • nwdissimilar — Generate node dissimilarities
  • nwduplicate — Duplicate a network
  • nwdyadprob — Generate a network based on tie probabilities
  • nwexpand — Expand variable to network
  • nwgen — Network extensions to generate
  • nwgenerate — Network extensions to generate
  • nwgenvar — Network extensions to generate
  • nwgeodesic — Calculate shortest paths between
  • nwhomophily — Generate a homophily network
  • nwlattice — Generate a lattice network
  • nwpath — Calculate paths between nodes
  • nwpermute — Generate permutation of a network
  • nwpref — Generate a preferential-attachment network
  • nwrandom — Generate a random network
  • nwreach — Calculate reachability network
  • nwring — Generate a ring-lattice network
  • nwsimilar — Generate node similarities
  • nwsmall — Generate a small-world network
  • nwsubset — Subset the nodes of a network
  • nwtranspose — Transpose a network

Information

Manipulation

Analysis

Centrality

  • nw2degree — Two-mode (bipartite) degree centrality
  • nwbetween — Calculate betweenness centrality
  • nwcentrality — Node centrality measures
  • nwcloseness — Calculate closeness centrality
  • nwdegree — Degree centrality and distribution
  • nwevcent — Calculate eigenvector centrality
  • nwinduced — Induced, endogenous and exogenous centrality
  • nwkatz — Calculate a Katz-inspired distance-decay centrality
  • nwpagerank — PageRank centrality

Cohesion, Components & Subgroups

Community Detection

  • 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 & Equivalence

  • nw2clustering — Clustering coefficient (transitivity) of a two-mode network
  • nwassortativity — Newman’s assortativity coefficient
  • nwbalance — Structural balance of a signed network
  • nwbrokerage — Gould-Fernandez brokerage roles
  • nwburt — Calculate Burt structural hole measures
  • nwclustering — Clustering coefficient (transitivity) of a network
  • nwconcor — CONCOR structural-equivalence blockmodel
  • nwconstraint — Calculate 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)
  • nwlambda — Edge (line) connectivity matrix between all node pairs
  • nwmatching — Maximum-cardinality bipartite matching
  • nwmixing — E-I index and mixing table for a categorical node attribute
  • nwshared — Calculate number of shared neighbors between nodes and saves information in network
  • nwsimilar — Generate node similarities
  • nwsimindex — Common-neighbor similarity indices between all node pairs

Paths, Reachability & Ego Networks

  • nwaltergen — Generate a variable from alter/neighbor attributes
  • nwego — Ego-network size and density
  • nwgeodesic — Calculate shortest paths between
  • nwmaxflow — Maximum flow and minimum cut between two nodes
  • nwneighbor — Extract the network neighbors of a node
  • nwpath — Calculate paths between nodes
  • nwrandomwalk — Mean random-walk hitting time to a target node
  • nwreach — Calculate reachability network

Statistical Estimation of Networks

  • nwcorrelate — Correlate networks and variables
  • nwcug — Conditional Uniform Graph (CUG) test
  • nwergm — Exponential-family random graph model (ERGM) estimation
  • nwqap — Multivariate QAP regression
  • nwsaom — Stochastic actor-oriented model (SAOM) estimation between observed network waves
  • nwutility — Calculate utility scores according to Jackson and Wollinsky (1996)

Other Analysis Utilities

  • nwcontext — Create a context variable
  • nwgen — Network extensions to generate
  • nwgenerate — Network extensions to generate
  • nwgenvar — Network extensions to generate
  • nwnode — Checks if node exists in a network
  • nwturnover — Tie turnover/stability between two waves of the same network
  • nwvalue — 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 own ds

Utilities

  • nwclear — Clear all networks and variables from memory
  • nwcurrent — Report and set current network
  • nwerrorcodes — What this package’s own custom return codes mean
  • nwinstall — Install Stata menu/dialogs
  • nwload — Load a network as Stata variables
  • nwnetworktypes — How commands classify binary/directed/weighted/signed/two-mode networks
  • nworder — Reorder networks in dataset
  • nwsync — Sync network with Stata variables
  • nwtomata — Return adjacency matrix of network
  • nwtomatafast — Return link to adjacency matrix of network
  • nwtostata — Copy a Mata matrix into Stata variables
  • nwunab — Unabbreviate network list
  • nwvalidate — Validate network name
  • nwvalidvars — Validate Stata variables for network

Visualization

  • 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

Uncategorized


Back to top

nwcommands is free to install and use, including for commercial research. See the GitHub repository for source, license, and issue tracking.

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