stata初级入门3-描述性统计指标.ppt

上传人:牧羊曲112 文档编号:6521322 上传时间:2023-11-08 格式:PPT 页数:21 大小:438.50KB
返回 下载 相关 举报
stata初级入门3-描述性统计指标.ppt_第1页
第1页 / 共21页
stata初级入门3-描述性统计指标.ppt_第2页
第2页 / 共21页
stata初级入门3-描述性统计指标.ppt_第3页
第3页 / 共21页
stata初级入门3-描述性统计指标.ppt_第4页
第4页 / 共21页
stata初级入门3-描述性统计指标.ppt_第5页
第5页 / 共21页
点击查看更多>>
资源描述

《stata初级入门3-描述性统计指标.ppt》由会员分享,可在线阅读,更多相关《stata初级入门3-描述性统计指标.ppt(21页珍藏版)》请在三一办公上搜索。

1、stata入门3统计指标篇,江金启沈阳农业大学经济管理学院,2023年11月8日星期三,计量经济学软件应用,2,一、基本描述统计量,summarize命令可概括观测值个数、平均值、标准差、最大值和最小值五个指标。语法:summarize varlist in if weight,options选项:detail可统计方差、偏度、峰度和各个分位数等指标。范例:summarize price mpg,2023年11月8日星期三,计量经济学软件应用,3,菜单:Statistics Summaries,tables,and tests Summary and descriptive statistic

2、s Summary statistics,2023年11月8日星期三,计量经济学软件应用,4,tabstat命令,语法: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、2023年11月8日星期三,计量经济学软件应用,5,菜单:StatisticsSummaries,tables,and testsTablesTable of summary statistics(tabstat),2023年11月8日星期三,计量经济学软件应用,6,ameans命令,估计算术、几何和调和平均数语法:ameans varlist if in weight,options范例:ameans price,2023年11月8日星期三,计量经济学软件应用,7,菜单:Statistics Summaries,tables,and tests Summary and descriptive

4、 statistics Arith./geometric/harmonic means,2023年11月8日星期三,计量经济学软件应用,8,二、单个分类变量的汇总统计,tabulate/tab1命令对分类变量的描述统计是观察其不同类别的频数或百分数。语法1:tabulate varname if in weight,options语法2:tab1 varlist if in weight,options选项:missing缺失值也作一类,plot作柱状图范例:tabulate foreign/tab1 foreign id,2023年11月8日星期三,计量经济学软件应用,9,菜单1:Stati

5、stics Summaries,tables,and tests Tables One-way tables,2023年11月8日星期三,计量经济学软件应用,10,菜单2:Statistics Summaries,tables,and tests Tables Multiple one-way tables,2023年11月8日星期三,计量经济学软件应用,11,三、两个分类变量的列联表,列联表是考察两个分类变量相关关系的方法列联表给出从属于两个分类变量不同类别的观测值的频数如果两个分类变量各有r,c个类别,则列联表共有rc个单元格,2023年11月8日星期三,计量经济学软件应用,12,tabu

6、late命令:语法1指定两个变量的列联表tabulate varname1 varname2 if in weight,options范例:tabulate foreign id,2023年11月8日星期三,计量经济学软件应用,13,菜单:Statistics Summaries,tables,and tests Tables Two-way tables with measures of association,2023年11月8日星期三,计量经济学软件应用,14,语法2多个变量内存在的所有可能列联分析结果tab2 varlist if in weight,options范例:tab2 fo

7、reign id rep78,2023年11月8日星期三,计量经济学软件应用,15,菜单:Statistics Summaries,tables,and tests Tables All possible two-way tabulations,2023年11月8日星期三,计量经济学软件应用,16,四、列联表描述统计量,tabulate,summarize():单个或两个分类变量的描述性统计格式:tabulate varname1 varname2 if in weight,options选项:no means(不)包含均值,no standard(不)包含标准差,no freq(不)包含频数

8、,no obs(不)包含观测值个数,missing将缺失值作为一类,2023年11月8日星期三,计量经济学软件应用,17,菜单:Statistics Summaries,tables,and tests Tables One/two-way table of summary statistics,2023年11月8日星期三,计量经济学软件应用,18,五、经验分布函数,对变量累积分布函数的估计cumul命令:通常与scatter(做散点图)一起使用格式:cumul varname if in weight,generate(newvar)options选项:freq使用频数作为累积分布范例:cumul price,generate(cprice)scatter cprice price,2023年11月8日星期三,计量经济学软件应用,19,菜单:Statistics Summaries,tables,and tests Distributional plots and tests Generate cumulative distribution,六、正态性检验,sktest varnameswilk varname,2023年11月8日星期三,计量经济学软件应用,20,本讲练习,2023年11月8日星期三,计量经济学软件应用,21,

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 生活休闲 > 在线阅读


备案号:宁ICP备20000045号-2

经营许可证:宁B2-20210002

宁公网安备 64010402000987号