Monday, November 6, 2017

Basic summary statistics in Stata

The command for basic summary statistics in Stata is summarize. Let's see this code in action. Copy and paste the following code into your Stata command window:

webuse census13
summarize brate




Here, we've called up Stata's built-in dataset and asked it to provide basic 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





With this command, you get basic summary 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




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

When you're ready for more complex summary statistics, check out our post on detailed summary statistics in Stata.

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

No comments:

Post a Comment