全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
3353 6
2016-07-23
stata默认数字格式,像“1,335”。能不能通过命令调整成“1335”?
PS:我指的是tab等命令出来以后的结果呈现的数字格式
二维码

扫码加我 拉你入群

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

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

全部回复
2016-7-23 11:25:43
看format命令的例子






Title

    [D] format -- Set variables' output format


Syntax

    Set formats

        format varlist %fmt

        format %fmt varlist


    Set style of decimal point

        set dp {comma|period} [, permanently]


    Display long formats

        format [varlist]


    where %fmt can be a numerical, date, business calendar, or string format.

            Numerical
              %fmt            Description              Example
        -------------------------------------------------------
        right-justified
              %#.#g           general                  %9.0g
              %#.#f           fixed                    %9.2f
              %#.#e           exponential              %10.7e
              %21x            hexadecimal              %21x
              %16H            binary, hilo             %16H
              %16L            binary, lohi             %16L
              %8H             binary, hilo             %8H
              %8L             binary, lohi             %8L

        right-justified with commas
              %#.#gc          general                  %9.0gc
              %#.#fc          fixed                    %9.2fc

        right-justified with leading zeros
              %0#.#f          fixed                    %09.2f

        left-justified
              %-#.#g          general                  %-9.0g
              %-#.#f          fixed                    %-9.2f
              %-#.#e          exponential              %-10.7e

        left-justified with commas
              %-#.#gc         general                  %-9.0gc
              %-#.#fc         fixed                    %-9.2fc
        -------------------------------------------------------
        You may substitute comma (,) for period (.) in any of
        the above formats to make comma the decimal point.  In
        %9,2fc, 1000.03 is 1.000,03.  Or you can set dp comma.


              date
              %fmt            Description              Example
        -------------------------------------------------------
        right-justified
              %tc             date/time                %tc
              %tC             date/time                %tC
              %td             date                     %td
              %tw             week                     %tw
              %tm             month                    %tm
              %tq             quarter                  %tq
              %th             half-year                %th
              %ty             year                     %ty
              %tg             generic                  %tg

        left-justified
              %-tc            date/time                %-tc
              %-tC            date/time                %-tC
              %-td            date                     %-td
              etc.
        -------------------------------------------------------
        There are many variations allowed.  See
        [D] datetime display formats.


二维码

扫码加我 拉你入群

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

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

2016-7-23 12:34:21
蓝色 发表于 2016-7-23 11:25
看format命令的例子
老师我指的是命令以后出来的格式...比如tab命令以后,呈现的表格里面的数字格式
二维码

扫码加我 拉你入群

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

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

2016-7-23 12:39:06
table,tabstat有format选项可以设置

tab没有选项就不行
二维码

扫码加我 拉你入群

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

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

2016-7-23 12:56:52
蓝色 发表于 2016-7-23 12:39
table,tabstat有format选项可以设置

tab没有选项就不行
好像没有这样的option...
二维码

扫码加我 拉你入群

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

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

2016-7-23 14:23:58
只有命令有该选项才可以

二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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