Using Stata for Survey Data Analysis


Download 1.39 Mb.
Pdf ko'rish
bet48/61
Sana08.03.2023
Hajmi1.39 Mb.
#1252470
1   ...   44   45   46   47   48   49   50   51   ...   61
Bog'liq
2009 Usingstataforsurveydataanalysis (1)

Minot
 
 
 
 
 
Using Stata for Survey Analysis 
Page 44 
 

then the average will include the zeroes. This is an extremely useful command, particularly for 


dealing with food consumption, expenditure, and crop production data. SPSS does not have a similar 
command. 
reshape 
The command changes a file from tall to wide or from wide to tall. What do we mean by “wide” and 
“tall”? A wide file stores additional information as separate variables, while a tall file stores this 
information using additional records. An example will be easier to understand. Food expenditure 
data includes different types of foods and the value of expenditure on each. One way to store this data 
is with a wide file, in which additional loans are stored in additional variables. 
File in “wide” format 
hhid 
food1 
value1
food2 
value2 
food3 
value3 





The other way to store the data is with a tall file, in which each food item is stored as separate 
observation.
File in “tall” format 
hhid 
food 
value 






























Notice that both files have the same number of data points (30) for food type and value, they are just 
arranged differently. The reshape command allows you to convert one type of file into the other. For 
more information, type “help reshape” in the Stata Command window. For information on how to 
implement reshape, type “help reshape.” 



Download 1.39 Mb.

Do'stlaringiz bilan baham:
1   ...   44   45   46   47   48   49   50   51   ...   61




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