= 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 == [[https://www.stata.com/manuals/dby.pdf|Stata manual for -by-]] ---- CategoryRicottone