nwvalidate

Validate a network name

Syntax

nwvalidate 
netname

Description

Checks if a network netname already exists. In case it does, the command makes a suggestion for an alternative name. Normally, the command returns netname_1. If that also exists, the commands returns netname_2.

Examples

. nwclear
. nwwebuse florentine
. nwvalidate flobusiness
. return list

Supported network types

Not applicable - a pure Stata-variable/network-name-collision check; does not read or depend on any network’s own content, directed/valued/two-mode status, or tie values.

Stored results

  • r(exists) “true” when network name already exists, “false” otherwise
  • r(tryname) network name that is validated
  • r(validname) valid name in case the tryname already exists
  • last certified : 25 Aug 2026

nwcommands version 3.17.6, 9 November 2026 (check your installed version)


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.