Monday, November 6, 2017

Detailed summary statistics in Stata

The command for basic summary statistics in Stata is summarize var1, detail, with var1 replaced by your variable name (or, as you'll see, more than one variable name). 

Let's see this code in action. Copy and paste the following code into your Stata command window:

webuse census13
summarize brate, detail




Here, we've called up Stata's built-in dataset and asked it to provide detailed summary statistics for the birthrate variable.




If you need basic summary statistics for more than one variable, simply list all of the variables after the summarize command:

summarize brate pop, detail



With this command, you get detailed descriptive statistics on two variables at the same time.

Let's say you wanted basic summary statistics on birthrate and population by region. You would use the following code:

by region, sort: summarize brate pop, detail




As you can see, this approach gives you basic summary statistics sorted by region.


Convinced of our expertise? Let 272Analytics assist with data analysis and/or methodology for your quantitative thesis or dissertation.

No comments:

Post a Comment