nwcompressobs

Drop observations that no network needs

Syntax

nwcompressobs

Description

Comresses the observations in Stata. Deletes all unnecessary cases that are not needed to represent the largest network. When the dataset also contains an attribute variable with non-missing data, these cases are not deleted.

Examples

. nwclear
. nwrandom 20, prob(.2)
. set obs 50
. nwcompressobs

Supported network types

Not applicable - trims trailing empty (all-missing) Stata observations from the dataset; does not read or depend on any network’s own content, directed/valued/two-mode status, or tie values.

See also


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.