nwclear

Clear all networks and variables from memory

Syntax

nwclear

Description

Clears all networks and variables from memory. This is the network extension of clear. One can also just drop some or all networks using nwdrop.

Note that Stata’s own clear (or clear all) does not remove the networks held by nwcommands; only nwclear does (or nwdrop for chosen networks).

This example loads network data and clears everything afterwards.

. nwwebuse glasgow
. nwclear

Alternatively, one can also just drop networks. This does not delete the Stata variables that are not associated with networks. For more information see nwdrop.

. nwdrop _all

Network types

The command works the same for every network type (see nwnetworktypes).

See also


nwcommands version 3.25.0, 14 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.