以下是引用wangzt在2008-1-13 11:26:00的发言:关于1。在command 命令里也可以用cd 命令,可以更改当前的目录。但我觉得奇怪的一件事,它“自动”的把我想要的目录设置成为默认目录了。我自己都不知道是在什么时候。我用cd 改过目录之后重启stata,又回到了原来的默认目录。
因此我觉得应该能够设置,修改默认目录的
你的直觉相当好,呵呵。stata可以很方便的做这件事情,具体如下:
新建一个do文档,保存为 profile.do ,保存至stata安装目录下,内容可参考如下设定(我本人的设定):
set type double
set memory 50m
set matsize 2000
set more off,perma
adopath + "D:\stata9\ado\personal"
adopath + "D:\stata9\ado\personal\_Myado"
local fn = subinstr("`c(current_time)'",":","",2) /*这一串是设定log文件的,我导师钟经樊的发明!*/
log using d:\stata9\do\s`fn'.log, text replace
cmdlog using d:\stata9\do\c`fn'.log, replace
sysdir set PLUS "D:\stata9\ado\plus"
sysdir set OLDPLACE "D:\ado"
sysdir set PERSONAL "D:\stata9\ado\personal"
cd d:\stata9\ado\personal /*这个就是你想要的,可以根据具体情况自行修改*/