help if
-------------------------------------------------------------------------------
Title
[U] 11.1.3 if exp
Syntax
command if exp
exp in the syntax diagram means that an expression, such as age>21. See
exp for an explanation of expressions.
There is another if used in Stata programming; see [P] if.
Description
if at the end of a command means the command is to use only the data
specified. if is allowed with most Stata commands.
Examples
. sysuse auto
. list make mpg if mpg>25
. list make mpg if mpg>25 & mpg<30
. list make mpg if mpg>25 | mpg<10
. regress mpg weight displ if foreign==1
Equality tests are performed by two equal signs (==), not one =; see
operators.
Also see
Manual: [U] 11.1.3 if exp
Help: [U] 11 Language syntax;
[U] 11 Language syntax (the by prefix),
[U] 11.1.4 in range (the in qualifier)