全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
8835 6
2009-12-20
我在命令窗口输入#delimit ;后出现unknown #command,这是为什么?恳请回答,谢谢!
二维码

扫码加我 拉你入群

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

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

全部回复
2009-12-20 13:07:38
command窗口中不能使用,只能在do-file-editor窗口中使用。
二维码

扫码加我 拉你入群

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

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

2009-12-20 14:05:22
谢谢回答! 2# sungmoo
二维码

扫码加我 拉你入群

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

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

2015-6-21 19:45:51
这个不make sense啊,我看也有人说只有在后面接了# delimit cr 才能完整的引用里面的命令,但我把完整的语句复制进去了还是会出现unknown #command,是没有安装什么程序,所以stata无法识别么
二维码

扫码加我 拉你入群

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

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

2015-6-21 21:29:04
前面人不是写了方法了吗

那个只能在do文件里面用
不能再命令窗口里面写。

要看人家给你们的解答。
二维码

扫码加我 拉你入群

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

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

2015-6-21 21:29:52
Title

    [P] #delimit -- Change delimiter


Syntax

        #delimit { cr | ; }


Description

  
  The #delimit command resets the character that marks the end of a command.  It
    can be used only in do-files and ado-files.


Remarks

    #delimit (pronounced pound-delimit) is a Stata preprocessor command.
    #commands do not generate a return code, nor do they generate ordinary Stata
    errors.  The only error message associated with #commands is "unrecognized
    #command".

    Commands given from the console are always executed when you press the Enter,
    or Return, key.  #delimit cannot be used interactively, so you cannot change
    Stata's interactive behavior.

    Commands in a do-file, however, may be delimited with a carriage return or a
    semicolon.  When a do-file begins, the delimiter is a carriage return.  The
    command "#delimit ;" changes the delimiter to a semicolon.  To restore the
    carriage return delimiter inside a file, use #delimit cr.

    When a do-file begins execution, the delimiter is automatically set to
    carriage return, even if it was called from another do-file that set the
    delimiter to semicolon.  Also, the current do-file need not worry about
    restoring the delimiter to what it was because Stata will do that
    automatically.


Examples

        --- begin myfile1.do ---------------------------
        use mydata, clear
        #delimit ;
        regress lnwage educ complete age c.age#c.age
                exp c.exp#c.exp tenure c.tenure#c.tenure
                i.region female ;
        predict e, resid ;
        #delimit cr
        summarize e, detail
        --- end myfile1.do -----------------------------


    Another way to do this without #delimit would be

        --- begin myfile2.do ---------------------------------
        use mydata, clear
        regress lnwage educ complete age c.age#c.age /*
                */ exp c.exp#c.exp tenure c.tenure#c.tenure /*
                */ i.region female
        predict e, resid
        summarize e, detail
        --- end myfile2.do -----------------------------------

    See [U] 16.1.3 Long lines in do-files for more information.


Technical note

    Just because you have long lines does not mean that you must change the
    delimiter to semicolon.  Stata does not care that the line is long.  There are
    also other ways to indicate that more than one physical line is one logical
    line.  One popular choice is ///:

        regress lnwage educ complete age c.age#c.age     ///
                exp c.exp#c.exp tenure c.tenure#c.tenure ///
                i.region female

    See [P] comments.

二维码

扫码加我 拉你入群

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

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

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群