Using Stata for Survey Data Analysis


Download 1.39 Mb.
Pdf ko'rish
bet35/61
Sana08.03.2023
Hajmi1.39 Mb.
#1252470
1   ...   31   32   33   34   35   36   37   38   ...   61
Bog'liq
2009 Usingstataforsurveydataanalysis (1)

Minot
 
 
 
 
 
Using Stata for Survey Analysis 
Page 30 
 

Example 13. Using “label” to make tables more readable

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
#delimit
In some cases, labels command may be very long. This is inconvenient when you are writing the 
command because, whether you are in the Do-file Editor or the Stata Command window, you have to 
scroll over to read the end of the command. The #delimit command solves this problem by allowing 
you to change the symbol used to indicate the end of the command. The default is a hard-return, 
called “cr” by Stata. The alternative is the semi-colon.
#delimit ; 
makes the semi-colon the indicator of the end of the command 
#delimit cr 
makes the hard-return the indicator of the end of the command 
Some facts about #delimit
It can only be used in a Do-file. It does not work in the Stata Command window. 
The semi-colon is useful if you have long commands
The hard-return is more convenient if you have short commands 
For example, the regional labels could be entered like this;
lab var region “Region of Bhutan” 
#delimit ; 
lab def reglbl 1 West
2 Center
3 East ; 
#delimit cr 
lab val region reglbl
An alternative way of dealing with long lines is: 
lab def reglbl 1 West /* 
*/ 
2 Center /* 
*/ 
3 East


Using Stata for Survey Data Analysis 
 
Minot 
 
Page 31
The #delimit command and the /* symbols can be used with any command, but they are often used 
with value labels. 

Download 1.39 Mb.

Do'stlaringiz bilan baham:
1   ...   31   32   33   34   35   36   37   38   ...   61




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