Professional Documents
Culture Documents
Variable Name(s)
Condition
To Know More About a
Removing Data Syntax: help <Syntax>
Specifying Delimiters
Specific Delimiter
Frequency Distribution:
One-way tables of frequencies
Syntax: tabulate or tab
Conditional Operators
Distribution of a Condition Symbol Meanings
Categorical Variable (Optional) > Greater than
< Less than
OR >= Greater than and
equal to
<= Less than and equal to
& and
| or
Sorting Categorical Categorical Variable == Equal to
Variable ! Not
~= OR != Not equal to
Sorting Data & Alternative to Syntax: bysort
Sort by 1st variable followed by 2nd variable
Algebraic Operators
New Variable Mathematical Existing Syntax Meanings
Name Function Variable
+ Addition or
Mathematical Functions Concatenation
- Subtraction
Some other functions Functions Syntax
Square root sqrt()
/ Divission
Functions Syntax Exponential exp() * Multiplication
If Function cond() Log base 10 log() ^ Powering
String substr() Lag base e ln()
Function
Obs. No. _n
Creation of Dummy variable
Syntax: generate OR gen
Followed By: