4 Software
“– And so, why can’t my numbers be beautiful to me? Why the scorn, the doubt in your face? Do you think I am brittle and dusty as old paper? Look again. See the numbers shine in my eyes.” (Pye, 2011)
In this document, I use Stata (StataCorp, 2021) to analyze data. Stata is my software of choice in this document because of Stata’s overall ease of use and intuitiveness. The creators of Stata have created a powerful program that is extremely simple to use, but with a wide range of both basic and advanced statistical capabilities.
The general idea of most Stata commands is:
do_something to_a_variable_or_variables, options
Often it is not necessary to use any options since the authors of Stata have done such a good job of thinking about the defaults.
For the sake of illustration, a few Stata commands are listed below.
Task | Command |
---|---|
Open data | use mydata.dta |
Descriptive statistics | summarize x y |
Frequencies | tabulate x |
Correlation | corr x y |
Regression | regress y x |
Logistic Regression | logit y x, or 1 |
Multilevel Model | mixed y x || group: x |
It is this multilevel syntax, mixed y x || group: x
that we will be using throughout this document.
Here we use the
,or
option to ask for odds ratios instead of logit coefficients.↩︎