Stata Walkthrough: Exploring and Describing Data
This is an optional assignment, intended to get you accustomed to working with data
To do this assignment, you will need to go to my webpage and download
the database of
SAT scores by U.S. states.
Open the database using the menus
or open it directly from your computer
to look at the types of variables and their labels.
normal, continuous values;
take discrete numerical values;
You will also see the labels attached to each variable, which should
explain what they measure
to view all of the observations in your database.
You will see the
state’s name, poverty rate, percentage of students taking the SAT, scores on
the test, and per student spending for each state.
to get some important summary statistics for each state
the mean, standard deviation, minimum and maximum
Note that you have
values for the state name, so Stata does not give you
summary statistics for this variable.
summ spend, detail
to get detailed summary statistics for this
In the “Percentiles” column, you determine the lower and upper
as well as the
The mean, standard deviation, and
variance are also shown.
You can use Stata as a calculator by typing “display” followed by some
The commands for basic operations are standard: +,
, *, /, and ^
Stata understands parentheses, and knows to always
Excuse My Dear Aunt Sally.
To confirm that the standard deviation is the
square root of the variance, type
You might be curious if spending is correlated with some other variables.
corr spend pover percent sat
to obtain a table of all the
correlation coefficients between the variables.
In the first column, you can
tell that there is a moderate negative correlation between spending and
states with higher poverty rates tend to spend less per student
a moderate positive correlation between spending and the percentage who
take the test
states that spend more tend to have more students who take the