Introduction To STATA Commands
Introduction To STATA Commands
1. What is STATA
a. It is one of the primary and most dominant statistical software. It is the statistical
software professed by the Textbook Woolridge 7th edition.
b. Some of STATA’s main output include:
i. Descriptive statistics
ii. Relationship between variables (linear & non-linear)
iii. Inferential Statistics & modelling
iv. Graphs
2. STATA interface
a. Toolbar
i. Open Data
ii. Save
iii. Log
iv. Do-file
b. Review bar (a history of your commands)
c. Results window (where the output of your commands appears)
d. Command pane (where you input your commands)
e. Variables pane (a list of all your variables)
f. Properties pane
3. Exploring your data
a. At the command pane, type: sysuse dir
b. Type sysuse auto (you may choose another dataset at your own leisure)
c. Type the following commands:
i. browse
ii. edit
iii. describe
iv. lists
v. summarize
vi. codebook
vii. tabstat mpg, statistic(q)
viii. tab foreign (or any other variable)
ix. tab mpg
x. tab turn
xi. tab mpg turn
d. Graphing your data
i. histogram mpg
ii. histogram mpg normal
e. Correlations
i. pwcorr mpg length, star(5)
f. Simple and Multiple Linear Regressions
i. reg price mpg
ii. ovtest
iii. reg price mpg weight
iv. ovtest
v. reg price mpg weight length headroom gear_ratio
vi. ovtest
Some variables such as make and foreign could not be used in the regressions due to it being “words”.
We will revisit this in transforming strings to numerics.