Stata Keep

-keep- subsets cases or variables.

See also -drop-.


Usage

Variables

keep foo bar baz

keep if foo==1

keep in 1/10

Note that variables are not re-ordered by -keep-. See -order- for that functionality.


CategoryRicottone

Stata/Keep (last edited 2025-10-24 17:06:27 by DominicRicottone)