júní 15, 2011

I Want to summarize data set( or Variable)

With descriptive Statistics road ending, I want to bid farewell with one more important command. The command is summarize. this gives brief summary statistics about all the variables or a specific chosen variable.

Form the menu bar, follow these steps

  1. Select Statistics > Summaries, tables, and tests > Summary and descriptive statistics > Summary statistics.
  2. Enter or select [Variable] in the Variables field.
  3. Select Display additional statistics.
  4. Click Submit.

Syntax:

.summarize or summ

or

.summarize [variable] or summ [variable]

This will output the details of the variable including percentile, mean, Kurtosis, Skewness and Standard Deviation.

Other similar commands: browse, describe, codebook

Assumptions:

  • You have loaded data set
  • all commands are typed in the Command window
A Gentle Introduction to Stata, Second Edition
stata

júní 13, 2011

My Codebook

Either type codebook  in the Command window and press Enter or navigate the menus to Data > Describe data > Describe data contents (codebook), and click OK. We get a large amount of output that is worth investigating. Look it over to see that much can be learned from this simple command. You can scroll back in the Results window to see earlier results, if need be. I will focus on specific variables, here the variable id

Syntax:

.codebook id (I assume you have loaded our data set)

Output

codebook

The codebook commands gives the variable name(id) Variable label (ID), type(whether numeric, String, e.t.c) number of unique values(here 30) ,mean, standard deviation, and major percentiles.

Use codebook when you want to know more about a variable.

Other similar Commands: describe, summary, browse