如何解决格式化Stata表,例如SAS中的表
表中的实际输出并不重要,我只想知道如何更改Stata表的格式。任何帮助表示赞赏!
解决方法
Stata Journal 中的groups
命令将为您提供大部分帮助。这个可重现的示例并没有穷尽所有可能性。
. webuse nlswork,clear
(National Longitudinal Survey. Young Women 14-26 years of age in 1968)
. groups union race,show(f F p P) sepby(union)
+--------------------------------------------------+
| union race Freq. #<= Percent %<= |
|--------------------------------------------------|
| 0 white 10777 10777 56.02 56.02 |
| 0 black 3784 14561 19.67 75.69 |
| 0 other 167 14728 0.87 76.56 |
|--------------------------------------------------|
| 1 white 2817 17545 14.64 91.20 |
| 1 black 1649 19194 8.57 99.77 |
| 1 other 44 19238 0.23 100.00 |
+--------------------------------------------------+
必须先安装命令,然后才能使用它。 groups
是一个糟糕的搜索词,但是这个search
可以找到该软件的2017年文字和更高版本的更新(在撰写本文时,在2018年只有一个)。
. search st0496,entry
Search of official help files,FAQs,Examples,and Stata Journals
SJ-18-1 st0496_1 . . . . . . . . . . . . . . . . . Software update for groups
(help groups if installed) . . . . . . . . . . . . . . . . N. J. Cox
Q1/18 SJ 18(1):291
groups exited with an error message if weights were specified;
this has been corrected
SJ-17-3 st0496 . . . . . Speaking Stata: Tables as lists: The groups command
(help groups if installed) . . . . . . . . . . . . . . . . N. J. Cox
Q3/17 SJ 17(3):760--773
presents command for listing group frequencies and percents and
cumulations thereof; for various subsetting and ordering by
frequencies,percents,and so on; for reordering of columns;
and for saving tabulated data to new datasets
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。