Stata By

The -by- prefix command splits the dataset by groups.


Usage

sort foo bar baz
by foo bar baz: generate byte duplicate = cond(_N==1, 0, _n)


See also

Stata manual for -by-


CategoryRicottone

Stata/By (last edited 2025-10-24 18:38:23 by DominicRicottone)