stata初级入门描述性统计指标PPT课件_第1页
stata初级入门描述性统计指标PPT课件_第2页
stata初级入门描述性统计指标PPT课件_第3页
stata初级入门描述性统计指标PPT课件_第4页
stata初级入门描述性统计指标PPT课件_第5页
已阅读5页,还剩16页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、2021年10月23日星期六计量经济学软件应用1一、基本描述统计量 summarize命令 可概括观测值个数、平均值、标准差、最大值和最小值五个指标。 语法:summarize varlist in if weight ,options 选项:detail可统计方差、偏度、峰度和各个分位数等指标。 范例:summarize price mpg第1页/共21页2021年10月23日星期六计量经济学软件应用2 菜单:Statistics Summaries, tables, and tests Summary and descriptive statistics Summary statistic

2、s第2页/共21页2021年10月23日星期六计量经济学软件应用3tabstat命令 语法: tabstat varlist if in weight , options 选项:默认结果是均值。 by(varname) 按变量varname进行分组描述性统计; statistics(statname .) 报告指定的描述性统计指标值。 nototal不报告总体统计值,通常是与by()配合使用 missing用by()选项时,显示by()变量的缺失值也作一类的结果。 范例:tabstat price mpg, by(id) statistics(mean ma mi sd n) missing第

3、3页/共21页2021年10月23日星期六计量经济学软件应用4 菜单:StatisticsSummaries, tables, and testsTablesTable of summary statistics(tabstat)第4页/共21页2021年10月23日星期六计量经济学软件应用5ameans命令 估计算术、几何和调和平均数 语法:ameans varlist if in weight ,options 范例:ameans price 第5页/共21页2021年10月23日星期六计量经济学软件应用6 菜单:Statistics Summaries, tables, and test

4、s Summary and descriptive statistics Arith./geometric/harmonic means第6页/共21页2021年10月23日星期六计量经济学软件应用7二、单个分类变量的汇总统计 tabulate/tab1命令 对分类变量的描述统计是观察其不同类别的频数或百分数。 语法1:tabulate varname if in weight , options 语法2: tab1 varlist if in weight , options 选项:missing缺失值也作一类,plot作柱状图 范例:tabulate foreign/tab1 foreig

5、n id第7页/共21页2021年10月23日星期六计量经济学软件应用8 菜单1: Statistics Summaries, tables, and tests Tables One-way tables第8页/共21页2021年10月23日星期六计量经济学软件应用9 菜单2:Statistics Summaries, tables, and tests Tables Multiple one-way tables第9页/共21页2021年10月23日星期六计量经济学软件应用10三、两个分类变量的列联表 列联表是考察两个分类变量相关关系的方法 列联表给出从属于两个分类变量不同类别的观测值的频

6、数 如果两个分类变量各有r,c个类别,则列联表共有rc个单元格 Total 11 53 64 Foreign 4 16 20 Domestic 7 37 44 Car type 1 2 Total id第10页/共21页2021年10月23日星期六计量经济学软件应用11 tabulate命令: 语法1指定两个变量的列联表 tabulate varname1 varname2 if in weight , options 范例:tabulate foreign id 第11页/共21页2021年10月23日星期六计量经济学软件应用12 菜单:Statistics Summaries, table

7、s, and tests Tables Two-way tables with measures of association第12页/共21页2021年10月23日星期六计量经济学软件应用13 语法2多个变量内存在的所有可能列联分析结果 tab2 varlist if in weight , options 范例:tab2 foreign id rep78第13页/共21页2021年10月23日星期六计量经济学软件应用14 菜单:Statistics Summaries, tables, and tests Tables All possible two-way tabulations第14

8、页/共21页2021年10月23日星期六计量经济学软件应用15四、列联表描述统计量 tabulate, summarize() :单个或两个分类变量的描述性统计 格式:tabulate varname1 varname2 if in weight , options 选项:no means(不)包含均值,no standard(不)包含标准差,no freq(不)包含频数,no obs(不)包含观测值个数, missing将缺失值作为一类第15页/共21页2021年10月23日星期六计量经济学软件应用16 菜单:Statistics Summaries, tables, and tests T

9、ables One/two-way table of summary statistics第16页/共21页2021年10月23日星期六计量经济学软件应用17五、经验分布函数 对变量累积分布函数的估计 cumul命令:通常与scatter(做散点图)一起使用 格式:cumul varname if in weight, generate (newvar) options 选项:freq使用频数作为累积分布 范例:cumul price, generate(cprice) scatter cprice price第17页/共21页2021年10月23日星期六计量经济学软件应用18 菜单:Statistics Summaries, tables, and tests Distributional plots and tests Generate cumulative distribution第18页/共21页六、

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论