Using Stata for Survey Data Analysis


log using filename [, append replace


Download 1.39 Mb.
Pdf ko'rish
bet24/61
Sana08.03.2023
Hajmi1.39 Mb.
#1252470
1   ...   20   21   22   23   24   25   26   27   ...   61
Bog'liq
2009 Usingstataforsurveydataanalysis (1)

log using filename [, append replace [ text | smcl ] ] 
where filename is that name you give the new file. The options are: 
append
adds the output to an existing file
replace
replaces an existing file with the output 
text 
tells Stata to create the log file in text (ASCII) format 
smcl
tells Stata to create the log file in SMCL format 
Here are some examples: 
log using temp22 
saves output to a file called temp22 
log using temp20, replace 
saves output to an existing file, replacing content 
log using temp20, append
saves output to an existing file, adding to contents 
log using “d:/BLSS/temp24”, text saves output in specified file in specified folder in text format 
Several points should be remembered in using this command: 


Using Stata for Survey Data Analysis 
 
Minot 
 
Page 19
if you use an existing file name but do not say “replace” or “append”, Stata will give an error 
message that the file already exists 
log files in text format can be opened with Wordpad, Notepad, the DOS editor, or any word 
processor., but the file will not have any formatting (e.g. no colors, bold, italics, or 
underlines) 
smcl files have formatting (bold, colors, etc) but can only be opened with Stata 
smcl format is the default 
log off 
This command temporarily turns off the logging of output, so that any subsequent output is not copied 
to the log file. This is useful if you want to save some of the output but not all. “Log off” only works 
after a “log using command.”
log on 
This command is used to restart the logging, copying any new output to the log file that was already 
defined. “Log on” only works after a “log using” and a “log off” command.
log close 
This command is used to turn off the logging and save the file. How are “log off” and “log close” 
different? “Log off” allows you to turn it back on easily with “log on,” continuing to use the same 
log file. After a “log close” however, the only way to start logging again is with “log using.”  

Download 1.39 Mb.

Do'stlaringiz bilan baham:
1   ...   20   21   22   23   24   25   26   27   ...   61




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