Week 1: Exploratory Data Analysis & Basic Statistics Flashcards

1
Q

What is the purpose of logs?

A

Logs record commands and output, allowing a permanent record of a session. Start a log with <log>, pause with <log>, resume with <log> and close with <log></log></log></log></log>

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

How can you view data?

A

Use <browse> to open a data table showing variables as columns and observations as rows.</browse>

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

How do you explore variable labels and codes?

A

Use <codebook> to view the labels and codes for a variable.</codebook>

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

What command is used to replace missing values?

A

Use <replace varname =. if varname == code> or <recode varname (code1/code2 =.)> to assign missing values.

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

What are the basic commands for viewing summary statistics?

A

Use <summarize> for basic stats, and <summarize varname, detail> for additional stats like median, mode, and percentiles.</summarize>

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

How do you create frequency tables?

A

Use <tab> to create a single frequency table for categorical data.</tab>

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

Which command generates a histogram?

A

Use <histogram varname, frequency> to produce a histogram showing the frequency distribution.

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

What syntax allows side-by-side histograms by category?

A

<histogram varname, frequency by(category)> creates histograms by groups (e.g., gender)

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

How can bar charts be generated?

A

For a basic bar chart, use <graph bar, over(varname)>, and adjust options for clarity.

Note: If you want frequencies instead of percentages, use the following command <graph bar(count), over(varname)>

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

Describe clustered bar charts in Stata.

A

Clustered bar charts display data for two variables. Use <graph bar, over(var1) over(var2)> to separate bars for each category of both variables.

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

What are box plots used for in Stata?

A

Box plots show data dispersion using the median, quartiles, and outliers. Use <graph> to create a box plot.</graph>

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

What is a cross-tabulation in Stata, and how is it done?

A

Cross-tabulation compares the frequency distribution of two variables. Use <tab var1 var2, row> or <tab var1 var2, col> for row/column percentages.

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

How do you save logs?

A

Save logs as PDFs using <translate></translate>

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