经管之家App
让优质教育人人可得
立即打开
全部版块
我的主页
›
论坛
›
计量经济学与统计论坛 五区
›
计量经济学与统计软件
›
Stata专版
如何做联立表格
楼主
longjun890521
1522
1
收藏
2015-03-29
悬赏
5
个论坛币
未解决
根据变量1(abcd)和变量2(ABCD)算收入的平均值
a
b
c
d
A
B
C
D
扫码加我 拉你入群
请注明:姓名-公司-职位
以便审核进群资格,未注明则拒绝
全部回复
沙发
蓝色
2015-3-29 16:51:15
看 table 命令
Examples
-----------------------------------------------------------------------------------------------------------------
Setup
. sysuse auto
One-way table; frequencies shown by default
. table rep78
One-way table; show count of nonmissing observations for mpg
. table rep78, contents(n mpg)
One-way table; multiple statistics on mpg requested
. table rep78, c(n mpg mean mpg sd mpg median mpg)
Add formatting
. table rep78, c(n mpg mean mpg sd mpg median mpg) format(%9.2f)
Two-way table; frequencies shown by default
. table rep78 foreign
Two-way table; show means of mpg for each cell
. table rep78 foreign, c(mean mpg)
Add formatting
. table rep78 foreign, c(mean mpg) format(%9.2f) center
. table foreign rep78, c(mean mpg) format(%9.2f) center
Add row and column totals
. table foreign rep78, c(mean mpg) format(%9.2f) center row col
-----------------------------------------------------------------------------------------------------------------
Setup
. webuse byssin
Three-way table
. table workplace smokes race [fw=pop], c(mean prob)
Add formatting
. table workplace smokes race [fw=pop], c(mean prob) format(%9.3f)
Request supercolumn totals
. table workplace smokes race [fw=pop], c(mean prob) format(%9.3f) sc
-----------------------------------------------------------------------------------------------------------------
Setup
. webuse byssin1
Four-way table
. table workplace smokes race [fw=pop], by(sex) c(mean prob) format(%9.3f)
Four-way table with supercolumn, row, and column totals
. table workplace smokes race [fw=pop], by(sex) c(mean prob) format(%9.3f) sc col row
-----------------------------------------------------------------------------------------------------------------
扫码加我 拉你入群
请注明:姓名-公司-职位
以便审核进群资格,未注明则拒绝
相关推荐
Abcdef
回忆几道玛氏笔试的题目(转载)
聚类后怎么分析结果?
多选题全选ABCD,判断题都猜对
请教一个多条数据和并成一条的问题,十分感谢大家
求助,数据的完全组合
abcdef
求问!请问期刊的ABCD这样的分类是如何划分的呢?
如何获取向量的次序
200论坛币高分悬赏,评分难题,高手进
栏目导航
Stata专版
真实世界经济学(含财经时事)
经管文库(原现金交易版)
宏观经济学
经管在职研
CPA注册会计师及其他财会考证
热门文章
Nature点赞!哈佛MIT最新作:AI科学家时代来 ...
CDA 认证考试大纲 2025 重磅更新:一二级考 ...
达富发投资关于中百集团行情数据操作分析与 ...
GTAP11运行扩展数据库出错,希望高手指点。
2025秋季大摩宏观团队闭门会议纪要
建筑的想象之整理补充笔记
英文书籍
中国移动:智能体互联网技术白皮书2025
超越普里瓦洛夫无穷乘积与它对解析函数的应 ...
超越普里瓦洛夫数项级数卷
推荐文章
10月重磅来袭|《打造Coze/Dify专属学术智能 ...
高校老师和学生都在偷偷上的智能体课,到底 ...
最快1年拿证,学费不足5W!热门美国人工智能 ...
关于如何利用文献的若干建议
关于学术研究和论文发表的一些建议
关于科研中如何学习基础知识的一些建议 (一 ...
一个自编的经济学建模小案例 --写给授课本科 ...
AI智能体赋能教学改革: 全国AI教育教学应用 ...
2025中国AIoT产业全景图谱报告-406页
关于文献求助的一些建议
说点什么
分享
微信
QQ空间
QQ
微博
扫码加好友,拉您进群
各岗位、行业、专业交流群