stata初级入门描述性统计指标

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

2020年10月13日星期二
《计量经济学软件应用》
13
语法2——多个变量内存在的所有可能列联分 析结果
tab2 varlist [if] [in] [weight] [, options]
范例:tab2 foreign id rep78
2020年10月13日星期二
《计量经济学软件应用》
14
菜单:Statistics > Summaries, tables, and tests > Tables > All possible two-way tabulations
2020年10月13日星期二
《计量经济学软件应用》
15
四、列联表描述统计量
tabulate, summarize() :单个或两个分类变量 的描述性统计
格式:tabulate varname1 [varname2] [if] [in] [weight] [, options]
选项:[no] means(不)包含均值,[no] standard(不)包含标准差,[no] freq(不) 包含频数,[no] obs(不)包含观测值个数, missing将缺失值作为一类
数等指标。 范例:summarize price mpg
2020年10月13日星期二
《计量经济学软件应用》
2
菜单:Statistics > Summaries, tables, and tests > Summary and descriptive statistics > Summary statistics
[,options] 范例:ameans price
2020年10月13日星期二
《计量经济学软件应用》
6
菜单:Statistics > Summaries, tables, and tests > Summary and descriptive statistics > Arith./geometric/harmonic means
标值。 nototal不报告总体统计值,通常是与by()配合使用 missing用by()选项时,显示by()变量的缺失值也作
一类的结果。
范例:tabstat price mpg, by(id) statistics(mean ma mi sd n) missing
2020年10月13日星期二
2020年10月13日星期二
《计量经济学软件应用》
16
菜单:Statistics > Summaries, tables, and tests > Tables > One/two-way table of summary statistics
选项:missing缺失值也作一类,plot作柱状图 范例:tabulate foreign/tab1 foreign id
2020年10月13日星期二
《计量经济学软件应用》
8
菜单1: Statistics > Summaries, tables, and
tests > Tables > One-way tables
tabulate varname1 varname2 [if] [in] [weight] [, options]
范例:tabulate foreign id
2020年10月13日星期二
《计量经济学软件应用》
12
菜单:Statistics > Summaries, tables, and tests > Tables > Two-way tables with measures of association
《计量经济学软件应用》
4
菜单:Statistics>Summaries, tables, and tests >Tables>Table of summary statistics (tabstat)
2020年10月13日星期二
《计量经济学软件应用》
5
ameans命令
估计算术ห้องสมุดไป่ตู้几何和调和平均数 语法:ameans [varlist] [if] [in] [weight]
2020年10月13日星期二
《计量经济学软件应用》
3
tabstat命令
语法: tabstat varlist [if] [in] [weight] [, options] 选项:默认结果是均值。
by(varname) 按变量varname进行分组描述性统计; statistics(statname [...]) 报告指定的描述性统计指
列联表给出从属于两个分类变量不同类别的观测 值的频数
如果两个分类变量各有r,c个类别,则列联表共有 r×c个单元格
Car type
id
1
2
Total
Domestic Foreign
7
37
44
4
16
20
Total
11
53
64
2020年10月13日星期二
《计量经济学软件应用》
11
tabulate命令: 语法1——指定两个变量的列联表
2020年10月13日星期二
《计量经济学软件应用》
9
菜单2:Statistics > Summaries, tables, and tests > Tables > Multiple one-way tables
2020年10月13日星期二
《计量经济学软件应用》
10
三、两个分类变量的列联表
列联表是考察两个分类变量相关关系的方法
2020年10月13日星期二
《计量经济学软件应用》
7
二、单个分类变量的汇总统计
tabulate/tab1命令
对分类变量的描述统计是观察其不同类别的频 数或百分数。
语法1:tabulate varname [if] [in] [weight] [, options]
语法2: tab1 varlist [if] [in] [weight] [, options]
stata入门3 ——统计指标篇
江金启 沈阳农业大学经济管理学院
一、基本描述统计量
summarize命令
可概括观测值个数、平均值、标准差、最大值和最 小值五个指标。
语法:summarize varlist [in] [if] [weight] [,options] 选项:detail可统计方差、偏度、峰度和各个分位
相关文档
最新文档