搜索
人大经济论坛 附件下载

附件下载

所在主题:
文件名:  profile.rar
资料下载链接地址: https://bbs.pinggu.org/a-1876993.html
本附件包括:
  • profile.do
附件大小:
623 Bytes   举报本内容

日志管理(二): title_创设标题与环境变量记录



问题:如何在log文件中创设标题


Stata程序:title

该命令通过星号描绘文本框,并在中间位置处添加标题,时间日期在右下角注明。




title 文本(自定义) , [ ss ll xl xxln(integer) b(integer) ]

[ ]为可选项,

ss 小号标题

ll 大号标题

xl 加大号标题

xxl 特大号标题

n()星号行数(自定义)

bl()文本框上边距(自定义)


3.范例:


  1. ssc install title

  2. title "SPSS R Stata EViews Matlab"

  3. title "SPSS" "R" "Stata" "EViews" "Matlab"
复制代码

  1. title ///
  2. "Thirty graphical tips Stata users should know" ///
  3. "Nicholas J. Cox" ///
  4. " Department of Geography, Durham University" ///
  5. "n.j.cox@durham.ac.uk"
复制代码

4.作者



Jan Brogger,jan.brogger@med.uib.no
附:
  1. #delimit ;
  2. di _n(3) in wh
  3. "___________________ tm" _n
  4. " /__ / ____/ / ____/" _n
  5. "___/ / /___/ / /___/ Population Pyramids and reshape" _n
  6. "----------------------------------------------------" _n(2) ;
复制代码

  1. #delimit ;
  2. title
  3. "___________________ "
  4. " /__ / ____/ / ____/"
  5. "___/ / /___/ / /___/ "
  6. ;
复制代码


5.如何记录环境变量

  1. local date `c(current_date)'
  2. local time `c(current_time)'
  3. local vers `c(stata_version)'
  4. local mem `c(memory)'
  5. local flav=cond(`c(MP)',"MP",cond(`c(SE)',"SE","IC"))
  6. local cwd `c(pwd)'
  7. display _newline "Run`date'at `time' on Stata/`flav' version `vers',memory=`mem' bytes"
  8. display _newline "Current working directory:`cwd'"
复制代码
可以将以上代码片段放入do文档中,即可在运行后日志中出现内存、版本、时间日期、工作目录等信息。

6.记录数据集信息

  1. sysuse auto,clear
  2. display _newline "Datafile:`c(filename)'(N=`c(N)',k=`c(k)') as of `c(filedate)'"
复制代码




    熟悉论坛请点击新手指南
下载说明
1、论坛支持迅雷和网际快车等p2p多线程软件下载,请在上面选择下载通道单击右健下载即可。
2、论坛会定期自动批量更新下载地址,所以请不要浪费时间盗链论坛资源,盗链地址会很快失效。
3、本站为非盈利性质的学术交流网站,鼓励和保护原创作品,拒绝未经版权人许可的上传行为。本站如接到版权人发出的合格侵权通知,将积极的采取必要措施;同时,本站也将在技术手段和能力范围内,履行版权保护的注意义务。
(如有侵权,欢迎举报)
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

GMT+8, 2025-12-31 20:40