Stata--log文档

log文档是记录程序及其运行的文档,它将所有在结果窗口出现的程序和结果输出到log文档(默认是scml格式,Stata特定的文件格式;也可以输出为txt,在log using时修改后缀名)。从log using 到 log close中间所有的程序及其运行结果都会被记录到log文件中。

global output "xxx" //define the output direction to store log files
log using $output\\mylog,replace  //open a log file (default format is smcl) to record codes and results
.
. 
.
log close //close the log file and save the log file

global output "xxx" //define the output direction to store log file
log using $output\\mylog,append  //append the codes and results to the origin log file mylog (default format is smcl)
.
.
.
log close //close the log file and save the log file

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容