Using Stata for Survey Data Analysis


Example 3: Using “list” to look at data


Download 1.39 Mb.
Pdf ko'rish
bet17/61
Sana08.03.2023
Hajmi1.39 Mb.
#1252470
1   ...   13   14   15   16   17   18   19   20   ...   61
Bog'liq
2009 Usingstataforsurveydataanalysis (1)

Example 3: Using “list” to look at data
Note that Stata, by default, shows an abbreviation of the value labels rather than the actual value. The 
value of the stratum variable for these households is 1, but Stata gives us the short version of the label 
“Urban” because it makes the data easier to read. Similarly, Ch refers to the dzongkhag Chukha. 
If you are not careful with list, you will get a lot more output than you want! For example, if we give 
the command “list stratum,” Stata will generate a table with 4007 lines of data. If Stata starts giving 
you too much output, use the “Stop” button. 
summarize  
The summarize command produces statistics on continuous variables like agehead, pcexpend, hhsize, 
etc. This is like the “descriptives” or “summarize” command in SPSS. The syntax looks like this:
summarize [varlist] [if exp] [in range] [, [detail]] 
By default, it produces the following statistics: 
Number of observations 
Average (or mean) 
Standard deviation 
Minimum 
Maximum 
If you specify “detail”, Stata gives you additional statistics, such as 
skewness,
kurtosis, 
the four smallest values 
the four largest values 
various percentiles.
Here are some examples: 
summarize 
gives statistics on all variables 
 summarize age 
pcexpend
gives statistics on selected variables 
summarize age if stratum==1 
gives statistics on age for urban households


Minot
 
 
 
 
 
Using Stata for Survey Analysis 
Page 12 
 

 
 
Example 4. Using “summarize” to study continuous variables 
The first example gives the statistics for the whole sample of 4007 households, while the second gives 
the statistics only for households in stratum 1, urban areas. The variable b21_q3ag refers to the age of 
the head of household, so the tables above indicate that urban households are youger, richers, and 
smaller than the average household in Bhutan.

Download 1.39 Mb.

Do'stlaringiz bilan baham:
1   ...   13   14   15   16   17   18   19   20   ...   61




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling