Stata commands - Cheat sheet
Comments
 Share
The version of the browser you are using is no longer supported. Please upgrade to a supported browser.Dismiss

 
$
%
123
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ABCDEFGHIJKLMNOPQRSTUVWXYZ
1
commandWhat does it do?example use
2
helpAccesses the Stata help file for a command.help insheet
3
insheetOpens a .csv file in Stata.
insheet using file.csv, clear
4
import excelOpens a .xls file in Stata.
import excel file.xls, clear
5
useOpens a .dta file in Stata.
use
6
tabTabulates the frequencies (%) for each answer for a certain variable.tab q1, m
7
describeProvides info on variables' types, labels, and formats.des q1
8
codebookProvides a lot more info!codebook q1
9
meanCalculates the (sample mean) of a variable.mean q1
10
summarizeCalculates some basic summary stats for a variable.summ q1
11
cdChanges the folder that Stata looks for files and stuff.cd "C:/My Documents/Stata training course"
12
pwdShows the current folder that Stata thinks it's in.pwd
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
Loading...
 
 
 
Sheet1