Stata Commands Flashcards

1
Q

cd

A

set current directory (or “folder”) - this is where Stata looks for or saves data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

use

A

brings data into memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

list

A

for looking at raw data - list displays the values of variables

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

tabulate (tab)

A

produces different tables, depending on options

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

summarize (sum)

A

calculates and returns a variety of univariate statistics (detail is important option with this cmd)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

tabstat

A

easy way to calculate statistics (esp measures of variability and central tendency) using Stata. Use statistics option.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

capture

A

allows cmds that follow to run despite presence of errors

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

sort

A

Sort arranges the observations of a data set in ascending order based on the values of variables specified in the
varlist

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

generate (gen)

A

used to create a new variable that will eventually be recoded

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

replace

A

used along with gen in the recoding process, replaces the contents of an existing variable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

recode

A

changes the values of variables according to user-specified rules

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

hist

A

creates a histogram

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

bysort:

A

stratifies the output of various cmds into subgroups and sorts on the stratifying variable (e.g. bysort sex: sum tvhours)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

graph box

A

used to create a box plot

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

graph export

A

saves graph just created

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

set seed

A

specifies the initial value of the random-number seed, to get the same values, used when creating dummy data set

17
Q

twoway scatter

A

used to create a scatter plot