经管之家App
让优质教育人人可得
立即打开
全部版块
我的主页
›
论坛
›
计量经济学与统计论坛 五区
›
计量经济学与统计软件
›
Stata专版
如何做联立表格
楼主
longjun890521
1598
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专版
经管高考
数据求助
人工智能论文版
新手入门区
经管文库(原现金交易版)
热门文章
表格结构数据特征与CDA数据分析师:精准适配 ...
问卷填写,每份50个论坛币
2025全球人工智能技术应用洞察报告
奇瑞QQ焕新归来
【中国电信】2025年云计算研究白皮书
房地产行业:2026年,年轻人应该先买车还是 ...
普华永道 - 中国影响力报告2025
【24更新,自用整理!】2007-2024省级环境保护 ...
【24重磅更新】2000-2024上市公司盈余管理合 ...
CDA数据分析脱产就业班于2026年3月7日开班! ...
推荐文章
2026JG学术冬训营:从Stata初高到Python机器 ...
【必看】【本版版规,欢迎发悬赏贴求助】
26年寒假天津站|Gemini论文写作&数据分析 ...
关于如何利用文献的若干建议
关于学术研究和论文发表的一些建议
关于科研中如何学习基础知识的一些建议 (一 ...
一个自编的经济学建模小案例 --写给授课本科 ...
AI智能体赋能教学改革: 全国AI教育教学应用 ...
2025中国AIoT产业全景图谱报告-406页
关于文献求助的一些建议
说点什么
分享
微信
QQ空间
QQ
微博
扫码加好友,拉您进群
各岗位、行业、专业交流群