Differences between revisions 1 and 2
Revision 1 as of 2023-06-08 00:59:05
Size: 437
Comment:
Revision 2 as of 2023-06-08 01:06:29
Size: 536
Comment:
Deletions are marked like this. Additions are marked like this.
Line 32: Line 32:
----



== See also ==

[[https://www.stata.com/manuals/dkeep.pdf|Stata manual for keep]]

Stata Keep

The keep command is used to subset cases or variables. See also the drop command.


Usage

Variables

keep foo bar baz

Note that the variables kept are not re-ordered. See the order command for that functionality.

Cases

keep if foo==1
keep in 1/10


See also

Stata manual for keep


CategoryRicottone

Stata/Keep (last edited 2023-06-08 20:18:29 by DominicRicottone)